Solve MS Ajax Script loading error in Safari & Chrome
Jan 16, 2008

Safari 3x and Google Chrome uses javascript engine called WebKit and which causes error similar to

Sys.ScriptLoadFailedException: The script 'http://localhost:2241/WebResource.axd?d=hvpXhV5kE...........' 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 is because in MicrosoftAjax.js file webkit is not defiened in the list of supported browser and which will cause exception while loading the script in browser.

To overcome this issue

  1. Create a javascript file with any name
  2. Put code below in it
    Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
    if( navigator.userAgent.indexOf( 'WebKit/' ) > -1 ) 
    {
     Sys.Browser.agent = Sys.Browser.WebKit; 
     Sys.Browser.version = parseFloat( navigator.userAgent.match(/WebKit/(d+(.d+)?)/)[1]); 
     Sys.Browser.name = 'WebKit'; 
    }
  3. In the code of your page put following
    <asp:ScriptManager ID="ScriptManager" runat="server" >
    <Scripts>
    <asp:ScriptReference Path="~/PATH TO YOUR SCRIPT" />
    </Scripts>
    </asp:ScriptManager>

This is using feature called script merge and adds new browser detection code in javascript of Microsoft Ajax.

This will fix the issue.

More information, click here

Prakash Software Solutions PVT LTD. Offer wide range of services to their clients all over the globe. We successfully delivered projects i.e. software development, cloud computing solutions, SharePoint development solutions, mobile app development and Microsoft technology solution to our Sweden, Denmark, Netherlands, France, Norway, Germany, Spain, Italy, Switzerland, Belgium, Luxembourg, Ireland, United Kingdom, United States, Canada, Brazil, Peru, UAE, Dubai, Saudi Arabia, Kuwait, Qatar, Bahrain, Singapore, New Zealand and Australia Clients.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Related Posts

Evaluate expression using Reflection

Using Reflection we can evaluate an expression where value of the variables in…

Jun 8, 2010

How to get status message from Telerik MVC Upload Control

Download Telerik library from http://www.telerik.com/products/aspnet-mvc.aspx To see demo of uplod control, visit http://demos.telerik.com/aspnet-mvc/upload…

Jun 21, 2011

Problem with AJAX popup extender and CollapsiblePanel in Opera

Opera randers HTML page bit differently then other browsers which will put your…

Nov 9, 2008
Top

Copyright © Prakash Software Solutions Pvt. Ltd. All Rights Reserved.