greenhive
01-28-2005, 05:54 AM
My problem is shown on this (http://blake.prohosting.com/wolfflow/combox.html) page. I have a combo box, and what I need is for the selections the user makes (into List 2) to be written into the textarea below the lists (don't ask why.)
So for example, if the user moves Alaska and Colorado into List 2, those 2 states would be written into the textarea below the lists.
I have a simple function selectAll() attached to the SAVE button which (unsurprisingly) when pressed selects all the items in List 2 .
function selectAll(box) {
for(var i=0; i<box.length; i++) {
box[i].selected = true;
}
}
It is called just using this:
<input type="button" name="submit_button" value="SAVE" onClick="selectAll(document.combo_box.list2);">
Also, it doesn't matter to me if the State names are written to the textarea as they are moved between Lists, or if they are moved as a group at the end by the user pressing SAVE.
Can anyone help me with this (pretty please.) How do I get the selected States to be written into the Textarea?
thanksmuch.
So for example, if the user moves Alaska and Colorado into List 2, those 2 states would be written into the textarea below the lists.
I have a simple function selectAll() attached to the SAVE button which (unsurprisingly) when pressed selects all the items in List 2 .
function selectAll(box) {
for(var i=0; i<box.length; i++) {
box[i].selected = true;
}
}
It is called just using this:
<input type="button" name="submit_button" value="SAVE" onClick="selectAll(document.combo_box.list2);">
Also, it doesn't matter to me if the State names are written to the textarea as they are moved between Lists, or if they are moved as a group at the end by the user pressing SAVE.
Can anyone help me with this (pretty please.) How do I get the selected States to be written into the Textarea?
thanksmuch.