<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

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top