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

AJAX related script errors

16 Answers 264 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ilse-Dorle Zander-Kilian
Top achievements
Rank 1
Ilse-Dorle Zander-Kilian asked on 14 May 2008, 09:34 AM
Hi,

We are using RadPanelBar as a type of side menu on our site but have ran in to problem when using the latest version from RadControsl for ASPNET AJAX Q1 2008.

The page that the RadPanelBar is situated is wihin an IFrame of a parent page.

When moving the mouse over the menu a jscript error occurs "top.document.documentElement is null or not an object".

Now, this problem led me to a microsoft support solution http://support.microsoft.com/kb/936993  which appeared to rectify the problem but subsequently many Telerik javascript exceptions are being thrown on page refreshes and on RadPanelBar client events. Examples of the exceptions are: -

  1. "Class already registered"
  2.  "Telerik.Web.UI.RadWebControl" does not derive from sys.component" 
  3. "Object of type Telerik.Web.UI.RadPanelBar cannot be converted to type Telerik.Web.UI.RadPanelBar"
Help with this would be really appreciated.

Thanks in advance.

David

16 Answers, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 14 May 2008, 11:31 AM
Hi David,

I'm sorry I cannot help with a direct suggestion for overcoming the problem - this is the first time we come across all of these javascript errors at once. I believe this is related to the application configuration, but I'm not sure.

Can you please isolate a small page of your application to a different one (still having the problem), pack it and send it to us in a formal support ticket? I'll run it on my side and give you a feedback on what's going on.

Looking forward to your reply,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ilse-Dorle Zander-Kilian
Top achievements
Rank 1
answered on 14 May 2008, 03:59 PM
Hi Erjan,

Thanks for your quick response.

We did as you suggested and created a new app using the RadBarPanel - it worked fine.

In addition we found out the reason for the "top.document.documentElement is null" exception, was due to one of our own javascript files where reserved properties such as left and top were redefined.

However we still experience the:-  

"Object of type 'Telerik.Web.UI.RadPanelBar' cannot be converted to type 'Telerik.Web.UI.RadPanelbar'

this javascript exception seems to be thrown from a Microsoft ajax jscript and happens on page refreshes.

Look forward to your thoughts on this.

Kind regards,

David
 
0
Erjan Gavalji
Telerik team
answered on 15 May 2008, 08:46 AM
Hi David,

I just rechecked the source code of the Telerik.Web.UI assembly and I did not find any references to "Telerik.Web.UI.Panelbar". Can you check if the page includes some js file reference, or some JavaScript code, where some assignment between different objects is done, or some type of object type validation? As you mention that the error happens only after a postback, it is possible that the references are added via the ScriptManager's RegisterStartupScript or RegisterClientScriptBlock methods.

Regards,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ilse-Dorle Zander-Kilian
Top achievements
Rank 1
answered on 15 May 2008, 09:07 AM
Yes sorry it was a typo - I meant to type "Telerk.Web.UI.RadPanelBar" (see my amended post) - plus the exception gets thrown from MicrosoftAjax.js script file. 

Regards,

David 
0
Erjan Gavalji
Telerik team
answered on 15 May 2008, 09:26 AM
Hi David,

Is it possible for you to prepare a small application demonstrating the problem, pack it and send it to us via a formal support ticket? I'm afraid we need to perform a check to find out what's happening. A live URL to observe the problem would help finding the problem faster too.

Looking forward to your reply,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ilse-Dorle Zander-Kilian
Top achievements
Rank 1
answered on 15 May 2008, 11:13 AM
HI again,

We wont be able to supply you with what you with the app for security reasons - plus its internal so you wouldnt be able to access it.

We have noticed that the error is consistently triggered by a javascript submit() statement i.e:-

document.forms[0].submit();
 
Any ideas why doing a form submit in this way would cause the problem?

Thanks and regards,

David
0
Erjan Gavalji
Telerik team
answered on 15 May 2008, 11:33 AM
Hi David,

No, a javascript form submit (be it a button click or form.submit() call) cannot cause the error by itself. Could it be that somehow the application loads two different assemblies (e.g. nested web applications)?

Are you using the distributed assemblies, or are you using assemblies you've built from the source code?

Kind regards,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ilse-Dorle Zander-Kilian
Top achievements
Rank 1
answered on 15 May 2008, 01:38 PM
Hi,

No nested applications and using distributed assemblies.
 
We now execute Sys.Application.Dispose() in the onload for the page and this has got rid of the error. 

The error seemed to be caused by javascripts functions related to disposal - could the error be to do with this disposing?

Kind regards,

David
0
Erjan Gavalji
Telerik team
answered on 15 May 2008, 03:06 PM
Hi David,

I'm afraid that I'm not familiar with a Sys.Application.Dispose method. Is it a method in a custom library, or do you just mean the Sys.Application.dispose() method? If the second option, basically you don't need to call that method, as it is called automatically in the page unload phase. If called during the page load phase it could break the proper client-side operation of the controls.

Please, find attached a small application with RadPanelBar in a page, located in an IFrame I just prepared. Can you fill it to demonstrate the problem and send it back? Please note, that the attached archive contains the trial versions of the Telerik.Web.UI assemblies. You can download the dev release from your ClientNet account.

Kind regards,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ilse-Dorle Zander-Kilian
Top achievements
Rank 1
answered on 15 May 2008, 03:37 PM
Hi again,

Sorry I dont need to look at your iframe app as I have already achieved this myself a few days ago. I think the problem lies with application specific scipts not working harmoniously with the ajax scripts. Thanks for you help but I think that it is working at a satisfactory level now.

Again thanks for your input

Kind regards,

David
0
Stijn
Top achievements
Rank 1
answered on 13 Jun 2008, 01:17 PM
i have the same problem, i guess: in my case 2 javascript errors appear after the page has loaded.

sys.argumentexception: telerik.web.ui.radwindow does not derive from sys.component
sys.argumenttypeexception: object of type 'sys._application' cannot be converted to type 'sys._application'

i can supply a sample page together with my web.config file, if you want.
0
Ilse-Dorle Zander-Kilian
Top achievements
Rank 1
answered on 16 Jun 2008, 09:38 AM
Hi Stijn

The link below suggests this problem is do to with smartnavigation and ajax not working well together. This solution works for me so far and it basically recommends that you use ScriptMode="release" for your ScriptManager/RadScriptManger controls when using SmartNavigation for your page.

Check out this link...

http://forums.asp.net/p/1040587/1447995.aspx 

All the best

David
0
Stijn
Top achievements
Rank 1
answered on 16 Jun 2008, 09:53 AM
i'm affraid none of this helps: the errors stay where they were.
0
Sharbel Lutfallah
Top achievements
Rank 1
answered on 25 Jul 2008, 04:47 PM
I just wanted to comment that a couple posts up someone said to remove Smart Navigation.  I think that deserves a KB listing because I am finding that a lot of the  javascript problems I am getting with Telerik controls happen when Smart Navigation is enabled on the page.  I know it's not Telerik's issue, smart nav has been crappy forever, just if people knew to disable it if they start getting weird errors, it would save some frustration.


0
Paul
Telerik team
answered on 28 Jul 2008, 05:31 AM
Hi Sharbel,

Actually, we do have a KB article on the matter - (ID#415) Using RadControls with SmartNavigation.

Sincerely yours,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Ilse-Dorle Zander-Kilian
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Ilse-Dorle Zander-Kilian
Top achievements
Rank 1
Stijn
Top achievements
Rank 1
Blaize
Top achievements
Rank 1
Sharbel Lutfallah
Top achievements
Rank 1
Paul
Telerik team
Share this question
or