Hi All,
The following is the function I used to create RADIO buttons using DOM.
It works fine with Netscape but not with IE.
function addGroup3Radio( ) {
var cellId = document.getEle mentById("cell1 ");
for(var i=0; i < arrData.length; i++) {
var objRadItem = document.create Element("input" );
objRadItem.type = "radio";
objRadItem.name = "radGroup";
objRadItem.id = "idrad_" + i;
objRadItem.valu e = arrData[i][0];
if(i == 1) {
objRadItem.defa ultChecked = true;
objRadItem.chec ked = true;
}
var objTextNode = document.create TextNode(" " + arrData[i][1]);
var objLabel = document.create Element("label" );
objLabel.htmlFo r = objRadItem.id;
objLabel.append Child(objRadIte m);
objLabel.append Child(objTextNo de);
var objBreak = document.create Element("br");
cellId.appendCh ild(objLabel);
cellId.appendCh ild(objBreak);
}
document.forms["FirstFormN ame"].addRadio.disab led = true;
}
Can any one help me to come out of this problem.
Thanks in advance
Raghuram Banda
The following is the function I used to create RADIO buttons using DOM.
It works fine with Netscape but not with IE.
function addGroup3Radio( ) {
var cellId = document.getEle mentById("cell1 ");
for(var i=0; i < arrData.length; i++) {
var objRadItem = document.create Element("input" );
objRadItem.type = "radio";
objRadItem.name = "radGroup";
objRadItem.id = "idrad_" + i;
objRadItem.valu e = arrData[i][0];
if(i == 1) {
objRadItem.defa ultChecked = true;
objRadItem.chec ked = true;
}
var objTextNode = document.create TextNode(" " + arrData[i][1]);
var objLabel = document.create Element("label" );
objLabel.htmlFo r = objRadItem.id;
objLabel.append Child(objRadIte m);
objLabel.append Child(objTextNo de);
var objBreak = document.create Element("br");
cellId.appendCh ild(objLabel);
cellId.appendCh ild(objBreak);
}
document.forms["FirstFormN ame"].addRadio.disab led = true;
}
Can any one help me to come out of this problem.
Thanks in advance
Raghuram Banda
Comment