Solved

Chrome and Safari fail on second ScriptManager.RegisterClientScriptInclude in updatepanel

Posted on 2009-07-08
1
3,272 Views
Last Modified: 2012-05-07
No one answered my initial question, so let me ask it differently.  Hopefully it will make more sense this time.

I have a ASP.Net/VB application, a master page, and updatepanel within a content page.  On a partial postback I need to include two .js based on the user input.  The first include works fine in all browsers.  The second include will kill Chrome and Safari.  The error that is thrown follows, after the error all JavaScript processing stops.

Here is the error from Chrome's JavaScript debugger:
uncaught exception Sys.ScriptLoadFailedException: Sys.ScriptLoadFailedException: The script 'http://www.***.js' failed to load. Check for:
 Inaccessible path.
 Script errors. (IE) Enable 'Display a notification about every script error' under advanced settings.
 Missing call to Sys.Application.notifyScriptLoaded().

I have added the following to the end of each .js file.
if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
 
        'FontFile?Name.Value contains the font name
        'FontFile?File.Value contains the .js file name containing font information created by Cufon
 
        ScriptManager.RegisterClientScriptInclude(UpdatePanel1, GetType(Page), FontFile1Name.Value, FontFile1File.Value)
        ScriptManager.RegisterClientScriptInclude(UpdatePanel1, GetType(Page), FontFile2Name.Value, FontFile2File.Value)
 
    End Sub

Open in new window

0
Comment
Question by:vshockney
1 Comment
 

Accepted Solution

by:
vshockney earned 0 total points
ID: 24818312
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question