Hi,
I am facing a strange issue. It's regarding radio button

I am using following code to generate radio button but the following
code behavesdifferent for different browser. In IE it sshows all
selected radio buttons and user can't deselect them. And in Mozilla it
shows last button selected.

function createRadioButtons(e){
        var radio_element = document.createElement('<input type="radio"
name="trim" value="aaaaa" checked>');
        var tr_element = document.createElement('tr');
        var td_element = document.createElement('td');
        var td_element2 = document.createElement('td');
        td_element.appendChild(document.createTextNode('link'));        
        td_element2.appendChild(radio_element);
        tr_element.appendChild(td_element);
        tr_element.appendChild(td_element2);
        e.appendChild(tr_element);
}
In above code 'e' is tbody which i m fetching using getElementById() function
But strange thing is if i write following code, it works fine in both
IE and mozilla

function createOnlyRadioButtons(e){
var radio_element = document.createElement('<input type="radio"
name="hood" value="aaaaa" checked>');
e.appendChild(radio_element);
}

Here 'e' is td element.

would any one please guide me to solve this problem.

Regards,
Vishakha

Reply via email to