View Full Version : Dropdown menu

08-04-2002, 06:34 PM
Can somebody tell me how to do a Dropdown menu with button to click efter your chooise, but when you click the button a new window popup, WITHOUT scroller,menu e.tc!!

Please help, thanks

08-04-2002, 07:50 PM
Try this :D


<script language="javascript">

function go(){

var url=document.forms[0].urlSelect.options[document.forms[0].urlSelect.selectedIndex].value




<select name="urlSelect">
<option value="">Choose A Page
<option value="http://www.acjavascripts.com">ACJavascripts
<option value="http://www.wsabastract.com">Javascript Kit
<option value="http://www.java-scripts.net">Java-scripts.net
<input type="button" value=" - GO - " onclick="go()">


Hope this helps :D:D

08-04-2002, 07:51 PM
Well, the button doesn't necessarily have anything to do with a dropdown. To just go somewhere in a new (plain) window with a button you can do this:

<input type="button" value=" Go "

Set the width and height as needed, remove scrollbars and resizable options as needed.

If you want the selection from the dropdown to pick the page to load into the new window you can do this:

<select name="s1">
<option value="/index.html">Home</option>
<option value="http://somewhere.com">Somewhere</option>
<option value="/deals/good.html">Good Deals</option>
<input type="button" value=" Go "

Note that the dropdown is named "s1" and that this same name occurs in 2 places in the button 'onclick', so the name must agree in those 3 places if you change it.