This is a migrated thread and some comments may be shown as answers.

Safari TextBox Sys.Application.notifyScriptLoaded

4 Answers 201 Views
Input
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 25 Apr 2008, 08:16 PM
For what its worth...

After working a few days with Telerik RadNumericTextBox it worked nicely in IE 7, FireFox but not in Safari on Windows.

I am using Safari Version 3.1(525.13)

I had a RadNumericTextBox inside a several panels, which were inside of a ASP.NET MultiView, which was inside of a ASP.NET Ajax Update Panel.

After scratching my noggin for a couple of days I kept strange javascript errors, I checked the web Inspector in Safari, and found the following error:

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 did the following:

1. changed my ScriptManager and specified a path
2. Include the asp.net AJAX scripts in a folder under my solution.
3. Write an exe that would rename the scripts supplied with Telerik to the names that were expected in the source.
Something like: /Scripts/Telerik.Web.UI/2008.1.415.20/Telerik.Web.UI.Input.MaskedTextBox.RadMaskedInputScript.js
4. Edit the scripts that were failing and added the following code to the end of the script:
    if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();

So far I have changed the following scripts:
Telerik.Web.UI.Input.NumericTextBox.RadNumericInputScript.js
Telerik.Web.UI.Input.TextBox.RadInputScript.js
Telerik.Web.UI.Input.MaskedTextBox.RadMaskedInputScript.js

By the way Telerik in there install supplies them as:
    Scripts\Input\TextBox\RadInputScript.js
But the exe that I wrote to rename all 63 of them to the correct names worked like a charm.


And I still have to check the rest of the scripts being used in my application.

4 Answers, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 28 Apr 2008, 12:12 PM
Unless someone at Telerik knows of a way around this problem. So that I dont have to deploy the scripts....or even edit the scripts to add the Sys.Application.notifyScriptLoaded line of code.... Anyone?
0
plamen
Top achievements
Rank 1
answered on 29 Apr 2008, 07:39 AM
hi


By default JavaScript files are served as web resources (embedded in the Telerik.Web.UI.dll assembly).

For custom deployment scenarios you can review this help topic


Hope this helps...
<John:Peel />
0
Jeff
Top achievements
Rank 1
answered on 29 Apr 2008, 12:06 PM
That is great and dandy....but in a really nice world, I shouldnt have to use the external scripts that I have to edit to make them work with certain browsers. I would believe this is an issue, and will it be fixed sometime soon? Until then I can use the work around... Thank you for letting me know.
0
Erjan Gavalji
Telerik team
answered on 23 May 2008, 03:45 PM
Hi guys (Jeff, please, excuse us for the delayed reply),

I wanted to say that the workaround you've found is completely valid (actually, if you register the <asp:scriptreference> tags directly to the ScriptManager, you don't even need the notifyScriptLoaded() call).

There are only two drawbacks I see:
  • Maintenance could become a bit harder in case we (Telerik) change the client script naming, or we add another script file to a control, etc. (this is the major one);
  • If you need the content to be combined, you would need to change the code of the tool (kind of related to the first drawback) and, if you need to have the content compressed, you'll need to find a different gzipping solution (IIS7 has this feature)
P.S. I'm posting a link to the RadUpload and MultiView in Safari 3 forum thread, where a similar problem is discussed.

Cheers,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Input
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
plamen
Top achievements
Rank 1
Erjan Gavalji
Telerik team
Share this question
or