Closed Bug 25013 Opened 25 years ago Closed 25 years ago

INPUT(type "radio") not created properly via DOM

Categories

(Core :: DOM: Core & HTML, defect, P3)

Other
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 17544

People

(Reporter: mryan, Assigned: vidur)

Details

Appending a radio control as a child of a span as in the following code does not work( it does on IE Explorer). An empty span is created instead and the text nodes actually show up below the span. -- the object ctrlSpan is already created as a span //create span to hold autoplay information var autoPlaySpan = null; autoPlaySpan = doc.createElement("SPAN"); autoPlaySpan.className = "autoPlaySpan"; setObjectRect( autoPlaySpan, "45px", "30px", "400px", "25px"); //append text node with the words "Auto Play" autoPlaySpan.appendChild( doc.createTextNode( oStringTable.kVocabAutoPlay ) ); //add segment radio button //first create span to hold segment radio control var segRadioSpan = null; segRadioSpan = doc.createElement("SPAN"); segRadioSpan.className = "vocabRadioCtrl clickable"; segRadioSpan.title = oStringTable.kSegRadioTip; segRadioSpan.onclick = handleSegRadioClick; setObjectRect( segRadioSpan, "0px", "70px", "80px", "25px"); var segRadio = doc.createElement ("INPUT"); segRadio.type = "radio"; segRadio.name = "autoPlayRadios"; segRadio.id = "segRadio" if (segRadio != null) { segRadioSpan.appendChild(segRadio); segRadioSpan.appendChild( doc.createTextNode( oStringTable.kVocabSegment ) ); } if (segRadioSpan != null) { autoPlaySpan.appendChild( segRadioSpan ); } --- more code --- if (autoPlaySpan != null) ctrlSpan.appendChild( autoPlaySpan ); if (ctrlSpan != null) doc.body.appendChild(ctrlSpan);
DUP of 17544. *** This bug has been marked as a duplicate of 17544 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
The problem is that the type attribute is speced as being readonly. The fix is to allow it to be settable at least if a frame hasn't yet been created for it.
Verified duplicate.
Status: RESOLVED → VERIFIED
Component: DOM Level 2 → DOM Other
Component: DOM Other → DOM Level 1
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.