I am using the Reflection js plugin to reflect one image in the head of my master page. Whenever the page initially loads, everything is in the right spot and perfect. If I navigate into the site, then use my browser back button OR a url to go up one page,
the imaged are all wrong. However, if I hit the refresh button, it fixes the issue. I have attached the code. I can do images later if needed. I am stumped. I have tried different load methods on the script, nothing seems to help.
<!-- Here is the head of the Master: -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script>
<script src="~/Scripts/jquery-1.3.2.js" type="text/javascript"></script>
<script src="~/Scripts/jquery.MultiFile.js" type="text/javascript"></script>
<script type="text/javascript" src="Scripts/reflection.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
<!-- Here is the section of the header that the Logo is displayed in.-->
<div class="title">
<asp:Image ID="Image1" runat="server" class="mummask" ImageUrl="~/Images/MagnaMummersMask.png" />
<asp:Image ID="Image3" runat="server" class="reflect" ImageUrl="~/Images/magna_blk.jpg" />
<asp:Image ID="Image2" runat="server" class="mummaskright" ImageUrl="~/Images/MagnaMummersMask2.png" />
</div>
<!-- Here is the Java -->
jQuery(function($) {
$("img.reflect").reflect({ height: .5, opacity: .5 });
});
Full code is not there, so it is tough to tell what is the problem. There can ge multiple issues. But if you are sure about this is the problem with the postback then try these-
Still having the issues. Was going to deploy this weekend but 1and1 doesn't support .Net 4. So I will be finding my client another host site. I will update this ASAP after I run it from the web.
Okay, I have started replacing the html <img> tags with <asp:Images> and it has helped...However, there is still a lag. If it weren't for 1and1 hosting being complete snobs and my client not being able to be contacted, this site would have been deployed
already and I could be testing it live...We are moving host this weekend! So, I will open this back up then if it persists! Thanks for all the help! Enjoy the weekend!
M
M
Marked as answer by Angie xu - MSFT on Aug 18, 2012 10:39 AM
TheMick
Member
1 Points
9 Posts
Image using jQuery reflect function lags on postback and browser back button.
Aug 11, 2012 04:09 AM|LINK
I am using the Reflection js plugin to reflect one image in the head of my master page. Whenever the page initially loads, everything is in the right spot and perfect. If I navigate into the site, then use my browser back button OR a url to go up one page, the imaged are all wrong. However, if I hit the refresh button, it fixes the issue. I have attached the code. I can do images later if needed. I am stumped. I have tried different load methods on the script, nothing seems to help.
<!-- Here is the head of the Master: --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head runat="server"> <title></title> <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script> <script src="~/Scripts/jquery-1.3.2.js" type="text/javascript"></script> <script src="~/Scripts/jquery.MultiFile.js" type="text/javascript"></script> <script type="text/javascript" src="Scripts/reflection.js"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <asp:ContentPlaceHolder ID="HeadContent" runat="server"> <!-- Here is the section of the header that the Logo is displayed in.--> <div class="title"> <asp:Image ID="Image1" runat="server" class="mummask" ImageUrl="~/Images/MagnaMummersMask.png" /> <asp:Image ID="Image3" runat="server" class="reflect" ImageUrl="~/Images/magna_blk.jpg" /> <asp:Image ID="Image2" runat="server" class="mummaskright" ImageUrl="~/Images/MagnaMummersMask2.png" /> </div> <!-- Here is the Java --> jQuery(function($) { $("img.reflect").reflect({ height: .5, opacity: .5 }); });Thanks in advance for all the help!
M
P.s. I wonder if it could be a CSS load issue?
asteranup
All-Star
30184 Points
4906 Posts
Re: Image using jQuery reflect function lags on postback and browser back button.
Aug 11, 2012 06:04 AM|LINK
Hi,
Full code is not there, so it is tough to tell what is the problem. There can ge multiple issues. But if you are sure about this is the problem with the postback then try these-
http://delicious.com/anupdg/add_endRequest+pageload
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
Angie xu - M...
All-Star
20240 Points
1717 Posts
Microsoft
Re: Image using jQuery reflect function lags on postback and browser back button.
Aug 14, 2012 03:20 AM|LINK
Hi
I think it may be the following possible issues:
1)XML/extraneous data in the image files
2) corrupt image files
Hope it helpful.
Feedback to us
Develop and promote your apps in Windows Store
TheMick
Member
1 Points
9 Posts
Re: Image using jQuery reflect function lags on postback and browser back button.
Aug 14, 2012 03:22 AM|LINK
Still having the issues. Was going to deploy this weekend but 1and1 doesn't support .Net 4. So I will be finding my client another host site. I will update this ASAP after I run it from the web.
Thanks for the info! I will try them all!
M
TheMick
Member
1 Points
9 Posts
Re: Image using jQuery reflect function lags on postback and browser back button.
Aug 18, 2012 02:23 AM|LINK
Okay, I have started replacing the html <img> tags with <asp:Images> and it has helped...However, there is still a lag. If it weren't for 1and1 hosting being complete snobs and my client not being able to be contacted, this site would have been deployed already and I could be testing it live...We are moving host this weekend! So, I will open this back up then if it persists! Thanks for all the help! Enjoy the weekend!
M