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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open dropdown menu on focus

Status
Not open for further replies.

myspiral

Technical User
Jun 11, 2004
17
0
0
CA
I have a page that when a user enters 3 letters it submits the page to itself, queries the database and gives a dropdown list with only entries that match those letters. What I want to do is when the page submits itself it sends the focus to the dropdown list, I have this working, I also want it to open the dropdown list as if the user hit the arrow on the menu. any suggestions
 
do you have a link to the site? can we see it?

--Chessbot
 
unfortunatly its on an intranet site but basically i want a menu/list to be open with the cursor inside it when the page loads
 
what kind of list is this? a <select> in a form? just a <ul>/<li> list? a bunch of text separated by <br>s?

--Chessbot
 
select form driven by a query
<select name="emailto" class="aceTextField" id="emailto">
<%Do Until emaillistdown.EOF%>
<option value=<%=UCase(emaillistdown("email"))%>><%=UCase(emaillistdown("firstname"))%>&nbsp;<%=UCase(emaillistdown("lastname"))%></option>
<%emaillistdown.MoveNext%>
<%loop%>
</select>
 
<body onLoad="window.document.form.emailTo.focus();">
change "form" to the name of your form.

this causes the select to be focused when the page loads.

--Chessbot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top