Solved

Chrome and Safari fail on second ScriptManager.RegisterClientScriptInclude in updatepanel

Posted on 2009-07-08
1
3,256 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now