Search All Articles Submit your Website or Blog to A New Internet Library
Friday, July 17, 2009
Fix: Cutom Javascript Does not load in case of Partial Postback using UpdatePanel.
When we are using Update Panel for asynchronous Partial page postback static javasctipt files will not be loaded and we may see error like "Permission Denied" or something like
Error: Sys.ScriptLoadFailedException: The script 'http://localhost/Js/FreeTextBox/FTB-ToolbarItems.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().
This scenario occurs like when we are using a cutom Text Editor inside a UpdatePanel which uses Javascript and loads javascript files.
In order to fix this issue.
We need to call Sys.Application.notifyScriptLoaded() once the file is loaded for that
Just we need to add below code at the last line of all such javascript files
if (typeof(Sys) != "undefined") { if (typeof(Sys.Application) != "undefined") { Sys.Application.notifyScriptLoaded(); }}
Happy Coding....
Also Read other Top Articles
- JSON Serialization in VS 2008
- Implementing Forms Authentication in Silverlight Application.
- Making GridView Rows or Individual Cells Clickable and Selectable.
- Enabling browser back button for GridView Paging and Sorting in Ajax 1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008)
- How to pass values from User Control to Page or calling Page methods from User Control.
- What is WCF?
- New features in C# 4.0
- C# to VB.NET and VB.NET to C# online free converter tools.


1 comments:
hello... hapi blogging... have a nice day! just visiting here....
Post a Comment
Post your comments/questions/feedback for this Article.