Closed
Bug 99353
Opened 23 years ago
Closed 23 years ago
dynamically created radio buttons do not group
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: douglas, Assigned: jst)
Details
From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90) BuildID: 20010726 When creating radio buttons by a script, the NAME parameter does not properly bind the radio buttons to form a radio button group. Reproducible: Always Steps to Reproduce: l = document.createElement('SPAN'); l.innerHTML = '<input type=radio name="' + group + '">'; d = l.firstChild; d.checked = value; parent.appendChild(l); Actual Results: The buttons made by the above script are not grouped, and so are nonfunctional. Expected Results: A script should be able to generate a radio button group.
Comment 1•23 years ago
|
||
*** This bug has been marked as a duplicate of 99352 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 2•23 years ago
|
||
Reopening -- I didn't notice the steps to reproduce in the two bugs were different; I just assumed the bug had been submitted twice. This may be still be a dup, but deserves a second look.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 3•23 years ago
|
||
There are a number of bugs relating to creating form elements dynamically. This is probably a dup of one of them, but I can't tell which.
Assignee: joki → jst
Component: DOM Events → DOM HTML
QA Contact: vladimire → stummala
Comment 4•23 years ago
|
||
Douglas, are you appending these radio buttons to a form? What is "parent"? Do you happen to have a complete testcase that reproduces the problem? (I can try to create one if not....)
Comment 5•23 years ago
|
||
Douglas: > Douglas, are you appending these radio buttons to a form? What is > "parent"? It could be a form, although it should work with any container, including document.body. > Do you happen to have a complete testcase that reproduces the > problem? (I can try to create one if not....) I do, but it depends heavily on the rest of my application. me: > It could be a form, although it should work with any container, > including document.body. That's not true. If the radio buttons are not in the same form, they don't need to be tied together with NAME. In particular, radio buttons in _different_ forms had better not be tied together. Hence it's critical to know whether the buttons are being added as children of a form or some descendant of a form. > I do, but it depends heavily on the rest of my application. Alright. I'll try to come up with reduced testcases tomorrow, most likely... Douglas: > Hence it's critical to know whether the buttons are being added as > children of a form or some descendant of a form. They are not in a form. I am using the radio buttons as UI elements, not as form elements. me: > They are not in a form. I am using the radio buttons as UI elements, > not as form elements. You still need to have a form around them if you want them to group correctly. Otherwise, how are we to know when you actually want grouping and when you do not?
Comment 6•23 years ago
|
||
Duplicate of '[RBTN]<input type="radio"> not mutually exclusive without form' *** This bug has been marked as a duplicate of 14445 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → DUPLICATE
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•