R
Raghuram Banda
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.getElementById("cell1");
for(var i=0; i < arrData.length; i++) {
var objRadItem = document.createElement("input");
objRadItem.type = "radio";
objRadItem.name = "radGroup";
objRadItem.id = "idrad_" + i;
objRadItem.value = arrData[0];
if(i == 1) {
objRadItem.defaultChecked = true;
objRadItem.checked = true;
}
var objTextNode = document.createTextNode(" " + arrData[1]);
var objLabel = document.createElement("label");
objLabel.htmlFor = objRadItem.id;
objLabel.appendChild(objRadItem);
objLabel.appendChild(objTextNode);
var objBreak = document.createElement("br");
cellId.appendChild(objLabel);
cellId.appendChild(objBreak);
}
document.forms["FirstFormName"].addRadio.disabled = 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.getElementById("cell1");
for(var i=0; i < arrData.length; i++) {
var objRadItem = document.createElement("input");
objRadItem.type = "radio";
objRadItem.name = "radGroup";
objRadItem.id = "idrad_" + i;
objRadItem.value = arrData[0];
if(i == 1) {
objRadItem.defaultChecked = true;
objRadItem.checked = true;
}
var objTextNode = document.createTextNode(" " + arrData[1]);
var objLabel = document.createElement("label");
objLabel.htmlFor = objRadItem.id;
objLabel.appendChild(objRadItem);
objLabel.appendChild(objTextNode);
var objBreak = document.createElement("br");
cellId.appendChild(objLabel);
cellId.appendChild(objBreak);
}
document.forms["FirstFormName"].addRadio.disabled = true;
}
Can any one help me to come out of this problem.
Thanks in advance
Raghuram Banda