5 Answers, 1 is accepted
Also, I noticed that the actual value of the checkbox is NOT lost in IE 6. It's just that the checkmark image disappears. Unfortunately, IE 6 is my company's standard browser, so I would greatly appreciate any suggestions on how to work around this issue.
Thanks
It looks like telerik has since fixed the radio button issue but the checkbox problem was introduced somewhere along the way. Although it may be fixed in the most recent release ... I'm still using Q1 2009 SP2 (version 2009.1.527).
You can view the previous post here:
http://www.telerik.com/community/forums/aspnet-ajax/splitter/radiobuttonlist-problem.aspx
Thanks
this
._oldMoveRootToParent(toOriginalParent);
The error is: Microsoft JScript runtime error: Out of memory
Here is the exact code I'm using:
Telerik.Web.UI.RadSlidingPane.prototype._oldMoveRootToParent = Telerik.Web.UI.RadSlidingPane.prototype._moveRootToParent;
Telerik.Web.UI.RadSlidingPane.prototype._moveRootToParent =
function(toOriginalParent){
// Save the state.
if($telerik.isIE){
var rootElement = this._contentElement;
var checkedCheckBoxes = [];
var allInputs = rootElement.getElementsByTagName('input');
for(var i=0, length=allInputs.length; i< length; i++)
{
var input = allInputs[i];
if(input.type == 'checkbox')
{
checkedCheckBoxes.push(input.getAttribute(
'checked'));
}
}
}
this._oldMoveRootToParent(toOriginalParent);
// Load the state.
if($telerik.isIE)
{
var rootElement = this._contentElement;
var allInputs = rootElement.getElementsByTagName("input");
for(var i=allInputs.length - 1; i>= 0; i--)
{
var input = allInputs[i];
if(input.type == 'checkbox')
{
if(checkedCheckBoxes.length == 0) break;
input.setAttribute(
'checked', checkedCheckBoxes.pop());
}
}
}
};
Please advise on how to avoid this.
Thanks
I would appreciate it if someone from telerik could answer these questions for me:
1. Is this issue fixed in the latest version of RadControls?
2. If not, then does the code below look good or could it still have problems in certain situations?
Thanks
//Telerik.Web.UI.RadSlidingPane.prototype._oldMoveRootToParent = Telerik.Web.UI.RadSlidingPane.prototype._moveRootToParent;
Telerik.Web.UI.RadSlidingPane.prototype._moveRootToParent =
function(toOriginalParent){
if($telerik.isIE){
var rootElement = this._contentElement;
var checkedCheckBoxes = [];
var allInputs = rootElement.getElementsByTagName('input');
for(var i=0, length=allInputs.length; i< length; i++)
{
var input = allInputs[i];
if(input.type == 'checkbox')
{
checkedCheckBoxes.push(input.getAttribute(
'checked'));
}
}
}
//this._oldMoveRootToParent(toOriginalParent);
if($telerik.isIE)
{
var rootElement = this._contentElement;
var allInputs = rootElement.getElementsByTagName("input");
for(var i=allInputs.length - 1; i>= 0; i--)
{
var input = allInputs[i];
if(input.type == 'checkbox')
{
if(checkedCheckBoxes.length == 0) break;
input.setAttribute(
'checked', checkedCheckBoxes.pop());
}
}
}
};
Straight to your questions:
- The problem is fixed in the Q2 2009 version of the Telerik.Web.UI assembly.
- Your code overrides a method in the RadSlidingPane and does not execute its original code - that is move the RadSlidingPane in the DOM. In case the RadSlidingPane does not move in the DOM, you do not need to save/load the state of the checkboxes. As a result, you can replace your code with the following line and still get the same result:
Telerik.Web.UI.RadSlidingPane.prototype._moveRootToParent = function(){};
Sincerely yours,
Tsvetie
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.