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

[Solved] Sys.ArgumentException: Value must be a DOM element

1 Answer 92 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Softwaremanagement
Top achievements
Rank 1
Softwaremanagement asked on 01 Apr 2009, 01:31 PM
After reading through your posts and your comments to the above error message, i came to the conclusion that you need a reminder.

As you know (out of other posts) there is an issue with Ajax, when you are getting the above mentioned exception whenever there are disabled buttons on a website and you click on them.
Any website having this bug can do normal PostBacks and can handle AjaxRequests!!

My problem is, that clicking on a disabled button causes the error ONLY on sites containing a RadEditor.
The normal behavior (mainly to do nothing) is verified, when there is no RadEditor!

It was mentioned half a year ago and your answer was not satisfiying.

Surely, i can search around and find the same error in other posts of other forums.
But we are paying for your conrols and you can not just lean back and point towards developers of other companies, when it was YOUR control that destroyed the event structure.

We are using Version 2008.2.826.20 of the telerik controls.
Since you dont make it easy from one to another version to update HUNDREDS of controls in less than 1 month, i would appreciate to receive a hotfix just for the RadEditor.
Seems you miscalculated the impact on updating existing projects! It took us weeks to rewrite code and styles the last time.

Example:

RadAjaxManager on a Masterpage
Website using two Usercontrols, included into a RadTabStrip with RadMultiPage
Website containing a disabled Button
UserControl1 containing a Button for Postbacks, CheckBoxes that are linked via Ajax, but NOT containing a RadEditor
UserControl2 containing a Button for Postbacks, CheckBoxes that are linked via Ajax AND containing a RadEditor

Now try clicking on the disabled Button of the website when you are showing Usercontrol1 and try when showing UserControl2.
UC1 works, UC2 throws an error in Jscript!

Try putting disabled Buttons in UC1... works!

Set RadEditor.Visible=false in UC2... now works!

Waiting for reply and hotfix, so we don't need to rewrite every single CSS (as we already tried updating to Q3 2008 and you renamed a bunch of CSS without mentioning it in any help).

1 Answer, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 03 Apr 2009, 03:53 PM
Hello Birgit,

We are sorry to hear about the problems you encounter during upgrade - and we are well aware that this has long been a top issue of frustration. It is one of the most important reason that the ASP.NET for AJAX suite was developed from scratch to replace the Classic suite of RadControls - to provide single DLL with all controls, APIs that do not change and follow well-established conventions. This has indeed worked out well... as far as code and API is concerned. For quite some time now it is a very rare occasion that upgrading to a new release or will cause the application to not compile or throw an error (and when it does, there is usually a very good reason for it).

Unfortunately, up until Q1 2009 this same level of compatibility was not reached for the controls' CSS skins.
Hence the change was made, and it is here to stay - and it ensures that from now very minimal changes will happen in CSS. The new skins feature much greater consistency and eliminate a number of limitations that existed - especially when trying to provide Theming for the complete application. In additon to the better look of the skins, a tool was developed to help upgrade "older" skins to the "new" conventions. You can learn more from the following blog post:
http://blogs.telerik.com/blogs/09-03-20/Using_pre-Q1_2009_skins_with_Q1_2009.aspx

As noted in the blog post - if for some reason the tool does not do the job for you - Telerik will gladly update any custom skins of yours to the latest release, as long as you send us a working project using those skins. We provide all these options becasue we recognize the problem it has created to customers who have developed custom skins.

That said, in case you wish to continue using the version that you have, here is some code that you need to add to the page - this code will fix the MS AJAX (and not Telerik) issue with pressing a disabled button:

<script> 
var controller = Telerik.Web.UI.Editor._PopupController.prototype; 
controller.old_registerGlobalBodyEventHandlers = controller._registerGlobalBodyEventHandlers; 
controller._registerGlobalBodyEventHandlers = function() 
//Trick RadEditor to not use MS AJAX handlers, but telerik handler - to avoid the MS AJAX bug with disabled elements  
var handler = $addHandler; 
$addHandler = $telerik.addExternalHandler; 
 
var unload = Sys.Application.add_unload; 
Sys.Application.add_unload = function(){}; 
 
this.old_registerGlobalBodyEventHandlers(); 
//Restore originals 
$addHandler = handler;  
Sys.Application.add_unload = unload;  
};  
</script> 


Best regards,
Tervel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Softwaremanagement
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Share this question
or