<select> problem

P

Poornima

Hello
I have a html page in which i have 2 list boxes.If i select an item
from listbox1 and click Add button it should get populated in the
listbox2.When i click ok all the items present in listbox2 should get
selected.But my problem is where there are no items in listbox2 are
also getting selected.

In short how to find out if an <option>is empty or not
I tried by writing the f'ing code

for(i=0;i<length1;i++) // length1 is the length of the listbox
{
if(x.options != null)
x.options.selected = true
else if(x.options == null)
x.options.selected = false
}

Thanks In Advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,708
Messages
2,569,346
Members
44,650
Latest member
LuckyVivo

Latest Threads

Top