Jun 18, 2002 #1 Raj1Patel Programmer Jan 29, 2002 5 0 0 GB Hi, I am looking to get a Drop Down box to drop down when it recevies foucs, through Javascript. Can anyone help? Raj.
Hi, I am looking to get a Drop Down box to drop down when it recevies foucs, through Javascript. Can anyone help? Raj.
Jun 18, 2002 #2 Boomerang Programmer Mar 30, 2001 766 0 0 NL Hi Raj, It's probably not exactly what you want, but try this (I tried something with the click() method, but that doesn't seem to work.): <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY onload="openSB('sb1')"> <script language="javascript"> function openSB(sName) { var j = document.body.all[sName].length document.body.all[sName].size = j document.body.all[sName][0].selected = true document.body.all[sName].focus() } </script> <select name="sb1"> <option>option 1 <option>option 2 <option>option 3 <option>option 4 <option>option 5 <option>option 6 <option>option 7 <option>option 8 <option>option 9 </select> <br> </BODY> </HTML> hope this helps, Erik <!-- My sport: Boomerang throwing !! This year I will participate at the World Championships in Germany. (http://www.boomerang2002.com)!! Many Happy Returns !! --> Upvote 0 Downvote
Hi Raj, It's probably not exactly what you want, but try this (I tried something with the click() method, but that doesn't seem to work.): <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY onload="openSB('sb1')"> <script language="javascript"> function openSB(sName) { var j = document.body.all[sName].length document.body.all[sName].size = j document.body.all[sName][0].selected = true document.body.all[sName].focus() } </script> <select name="sb1"> <option>option 1 <option>option 2 <option>option 3 <option>option 4 <option>option 5 <option>option 6 <option>option 7 <option>option 8 <option>option 9 </select> <br> </BODY> </HTML> hope this helps, Erik <!-- My sport: Boomerang throwing !! This year I will participate at the World Championships in Germany. (http://www.boomerang2002.com)!! Many Happy Returns !! -->
Jun 18, 2002 Thread starter #3 Raj1Patel Programmer Jan 29, 2002 5 0 0 GB Hi Boomerrang, Yes I had the same problem with the click event. It does not seem to drop the DropDown selection bit. I like your idea, however, I am not looking to make it into a listbox just keep a DropDown. I wonder if there is anyway of getting rid of the scroll bar on the right of the listbox and hey presto just what I am looking for. Raj Upvote 0 Downvote
Hi Boomerrang, Yes I had the same problem with the click event. It does not seem to drop the DropDown selection bit. I like your idea, however, I am not looking to make it into a listbox just keep a DropDown. I wonder if there is anyway of getting rid of the scroll bar on the right of the listbox and hey presto just what I am looking for. Raj