I have a standard thumbnail gallery with a carousel to browse through the thumbnails. I have a set of links, when clicked, loads the thumbnails into the carousel. In IE, this works awesome and perfect. In Chrome, FF and Safari, the partial-postback is not being sensed and the js is not being re-loaded on asyncpostback because the jquery on the page is all broken/not working (ie togglefade not working, click events not firing for hide events, etc)
EDIT: ** On the HTML side, there are 2 update panels, one nested within the other. I added the HTML code which might help. I’ve stripped out most of the page content and just left the update panels, etc so everyone can get a idea of the html side of things.
HTML
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="updtPnlRedCarpet" runat="server">
<ContentTemplate>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="redCarpetCarousel">
<div class="redCarpet">
<asp:PlaceHolder ID="PlaceHolder1" runat="server" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
INSIDE CODE-BEHIND PAGE_LOAD EVENT
if (ScriptManager.GetCurrent(this.Page).IsInAsyncPostBack)
{
RegisterClientStartupScript();
}
REGISTER CLIENT START-UP SCRIPT CODE-BEHIND
private void RegisterClientStartupScript()
{
string path = Page.ResolveUrl("~/Scripts/jquery.msCarousel-min.js");
ScriptManager sManager = ScriptManager.GetCurrent(this.Page);
if (sManager != null && sManager.IsInAsyncPostBack)
{
ScriptManager.RegisterClientScriptInclude(
this.updtPnlRedCarpet, typeof(string), "include-js",
path);
ScriptManager.RegisterStartupScript(this.updtPnlRedCarpet, this.updtPnlRedCarpet.GetType(), "SliderScript",
"runTheCarousel();", true);
ScriptManager.RegisterStartupScript(this.updtPnlRedCarpet, this.updtPnlRedCarpet.GetType(), "ClickScript",
"loadThePage();", true);
}
else
{
this.Page.ClientScript.RegisterClientScriptInclude("SliderScript", path);
}
}
Ok, so it seems that FF, Chrome and Safari DO NOT like document.ready before javascript functions. Once I removed the document.ready bits, FF, Chrome and Safari were able to find the functions and everything is once again quiet in the universe.