PDA

View Full Version : [NETSCAPE] select a option


320rwekfpl
09-20-2002, 10:09 AM
I've written a script that removes options from a select. For this to work, I need to select a option before I try to remove it. Here lies the problem;

I cannot get Netscape to select an option when there's only one option left. I can select one in the list, but it's never shown.

Anyone knows why? It's possible to select a option, which is shown, when there are multiple choices...

Alekz
09-20-2002, 11:10 AM
Hi,

document.frm.listbox.options[0].selected = true;

Or something near, should do the job.

Alex

320rwekfpl
09-20-2002, 11:54 AM
Tried that one, but it doesn't work, or should I say... I does work when there's more than one option, but not when there's only one.
It's strange, and therefore I must be doing something wrong. It shouldn't matter how many options I have as long as there's at least one.