PDA

View Full Version : Opening select object from javascript code???


holloka
11-11-2002, 09:39 PM
Hi all!
I have about dozen arrays containing options (they are links) and one select object I fill with array user have chosen (some kind of navigating system :D )
Anyone idea how to access that select object so it opens when I change it's option elements with javascript?
It works fine and is easy to add, change and remove options, nice looking and takes just small area on page but it's not so user friendly because of one extra click needed to open that select :confused:

beetle
11-11-2002, 10:45 PM
I tested invoking the click() method on a SELECT element remotely and it DID NOT cause the select to 'open up'. Not sure if this can be done....<form>
<select id="one" name="one">
<option value="opt 1">Option 1</option>
<option value="opt 2">Option 2</option>
<option value="opt 3">Option 3</option>
<option value="opt 4">Option 4</option>
<option value="opt 5">Option 5</option>
</select>

<input type="button" value="Click It!" onClick="this.form.one.click()" />
</form>

holloka
11-11-2002, 11:22 PM
I've tried that too :confused: ..and several other methods...