Solved

Chrome and Safari fail on second ScriptManager.RegisterClientScriptInclude in updatepanel

Posted on 2009-07-08
1
3,230 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
Comment Utility
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 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