Hello,
I'm using RadEditor (Prometheus) in my page, and during the editor's "OnClientLoad" event I'm trying to attach the code for the events like paste, blur with the help of "Telerik.Web.DomElement.addExternalHandler". But I'm getting the following javascript error : "Telerik.Web.DomElement is null or not an object", when I try to run my page . Can anyone help me out in resolving this issue?.
Thanks & Regards,
Reethish

<
telerik:RadComboBox ID="RadComboBox1" runat="server">
<Items>
<telerik:RadComboBoxItem Value="E" Text="Engineering" />
<telerik:RadComboBoxItem Value="P" Text="Physics" />
</Items>
</telerik:RadComboBox>
Now when I select Physics in the list it should display P in the textbox. Please let me know if this is possible with RadComboBox.
Thanks
Hemangajit
| <add assembly="Telerik.Charting, Version=2.0.2.0, Culture=neutral, PublicKeyToken=D14F3DCC8E3E8763"/> |
| <add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI" /> |
| Could not load file or assembly 'Telerik.Charting, Version=2.0.2.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) |
if(this._onResizeDelegate){
$removeHandler(window,"resize",this._onResizeDelegate);
this._onResizeDelegate=null;
}
This part of the code seems fine.
However, _initializeDimensions has:
if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1){
this._onResizeDelegate=Function.createDelegate(this,this.onWindowResize);
setTimeout(function(){
$addHandler(window,"resize",_1._onResizeDelegate);
},0);
}else{
this._onResizeDelegate=Function.createDelegate(this,this.onWindowResize);
$addHandler(window,"resize",this._onResizeDelegate);
}
The problem is that the resize delegate is saved before the handler is actually added via a call to setTimeout. If the window's location changes before this setTimeout method runs, an exception is thrown because $removeHandler is called when $addHandler never was.
I believe the corrected code would be as follows:
if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1){
setTimeout(function(){
this._onResizeDelegate=Function.createDelegate(this,this.onWindowResize);
$addHandler(window,"resize",_1._onResizeDelegate);
},0);
}else{
this._onResizeDelegate=Function.createDelegate(this,this.onWindowResize);
$addHandler(window,"resize",this._onResizeDelegate);
}
Simply move setting the resize delegate inside anonymous delegate executed by setTimeout. This way, if setTimeout never runs, the resize delegate is null and $removeHandler is never called.
If necessary, I can post an example of this error. It's easily reproduced via something like a client-side refresh/redirect.
Thanks for looking into this.
David
