Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open a select list in javascript

Status
Not open for further replies.

eguthrie

Programmer
Nov 30, 2001
51
0
0
US
Is there a way to programmatically open a select list in javascript?

I have a javascript function that populates a select list with new options when the selectlist is first clicked. But then it closes the list, so the user has to click again to open the list to select an item.

To avoid the user having to click it twice, I would like to be able to programmatically open the select list after the list is populated.

Thanks.
 
Opening a select element programatically is not something that can easily be done cross-browser. As cLFlaVA says, finding another time to populate it would be advisable - maybe onload?

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
The same select list is contained in each of ~150 - 200 rows within a table. In order to reduce the size of the page, I don't want to populate the list for each row when the page is initially rendered. At the time the page is loaded, I only populate each list with only 1 selection -- the current selection applicable to the row.

When the user clicks the select list to select another option, that is when I populate with the other available options.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top