[thelist] Radio buttons: dynamically loading form data

Anthony Baratta Anthony at Baratta.com
Tue Apr 9 01:12:01 CDT 2002


At 10:31 PM 4/8/2002, Timothy Martens wrote:
>Hi everyone -- How can I tweak this so that when one clicks back on the
>"Default" radio button (after having clicked another) the original
>"Default Choices" option values get loaded back into the select box?

When I've rebuilt Select Boxes, I've always first deleted them in reverse
order.

with (document.Form.SelectList) {
    for (var i = options.length - 1; i > 0; i--) {
       options[i]=null;
    }
    for (var i = 0; i <= varNewArray.length - 1; i++) {
       options[i] = varNewArray[i];
    }
    options[0].selected=true;
}

---
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."




More information about the thelist mailing list