Solved

Chrome and Safari fail on second ScriptManager.RegisterClientScriptInclude in updatepanel

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Check if Object property exists? 3 19
tag title an image 13 24
replace all occurrences within a string 8 17
Removing HTML elements using javascript 4 20
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
The viewer will learn how to count occurrences of each item in an array.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

20 Experts available now in Live!

Get 1:1 Help Now