Hi,
I've got a small javascript problem and I'm kinda stuck. I'm using
classic ASP. I have a select box which is populated by a database query
and there is a buttom that when clicked it will move the selected item
from the first select box and move it to another select box:
document.form2. list.options[document.form2. list.options.le ngth] = new
Option(count + 1 + ". " + name,company);
Then I want to remove it from the first select box:
document.form1. companies.optio ns[document.form1. companies.selec tedIndex]
.text = "";
But that just leaves an empty spot. I need to remove that spot
altogether and move all the other items up by one.
This is what I have:
for (i=document.for m1.companies.op tions.length-1; i>0;
i--){document.form 1.companies.opt ions[document.form1. companies.selec tedI
ndex].value = i;
}
But this doesn't work.
Anyone have any ideas?
Thanks
Rob
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment