AJAX related script errors

17 posts, 0 answers
  1. Ilse-Dorle Zander-Kilian
    Ilse-Dorle  Zander-Kilian avatar
    18 posts
    Member since:
    Jan 2006

    Posted 14 May 2008 Link to this post

    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
  2. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 14 May 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ilse-Dorle Zander-Kilian
    Ilse-Dorle  Zander-Kilian avatar
    18 posts
    Member since:
    Jan 2006

    Posted 14 May 2008 Link to this post

    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
     
  5. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 15 May 2008 Link to this post

    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
  6. Ilse-Dorle Zander-Kilian
    Ilse-Dorle  Zander-Kilian avatar
    18 posts
    Member since:
    Jan 2006

    Posted 15 May 2008 Link to this post

    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 
  7. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 15 May 2008 Link to this post

    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
  8. Ilse-Dorle Zander-Kilian
    Ilse-Dorle  Zander-Kilian avatar
    18 posts
    Member since:
    Jan 2006

    Posted 15 May 2008 Link to this post

    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
  9. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 15 May 2008 Link to this post

    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
  10. Ilse-Dorle Zander-Kilian
    Ilse-Dorle  Zander-Kilian avatar
    18 posts
    Member since:
    Jan 2006

    Posted 15 May 2008 Link to this post

    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
  11. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 15 May 2008 Link to this post

    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
  12. Ilse-Dorle Zander-Kilian
    Ilse-Dorle  Zander-Kilian avatar
    18 posts
    Member since:
    Jan 2006

    Posted 15 May 2008 Link to this post

    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
  13. Stijn
    Stijn avatar
    10 posts
    Member since:
    Mar 2008

    Posted 13 Jun 2008 Link to this post

    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.
  14. Ilse-Dorle Zander-Kilian
    Ilse-Dorle  Zander-Kilian avatar
    18 posts
    Member since:
    Jan 2006

    Posted 16 Jun 2008 Link to this post

    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
  15. Stijn
    Stijn avatar
    10 posts
    Member since:
    Mar 2008

    Posted 16 Jun 2008 Link to this post

    i'm affraid none of this helps: the errors stay where they were.
  16. Sharbel Lutfallah
    Sharbel Lutfallah avatar
    26 posts
    Member since:
    Feb 2006

    Posted 25 Jul 2008 Link to this post

    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.


  17. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 28 Jul 2008 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017