|
Post by Ross on Jan 23, 2006 12:26:32 GMT -5
var radio = document.createElement('input'); radio.setAttribute('type', 'radio'); radio.setAttribute('name', 'question'+i); Why is that not setting the name attribute? I also tried radio.name = 'question'+i; but still with no result
|
|
|
Post by Bradley on Jan 23, 2006 15:28:52 GMT -5
Is it within a form tag? Sometimes form elements refuse to work correctly when they aren't.
|
|
|
Post by Ross on Jan 23, 2006 18:28:09 GMT -5
I put it in a form tag and it still didn't want to work. Until I figure it out I've used var radio = document.createElement('<input name="question'+i+'">'); even though that doesn't work in fx.
|
|
|
Post by Bradley on Jan 24, 2006 18:07:39 GMT -5
Try making it, then adding it to a form tag (or a child) by using appendChild, then set the attributes.
|
|