PDA

View Full Version : HTML Dropdown Boxs



12-04-2002, 09:02 PM
I am a newbie to html coding so I got a javascript code for a link drop down box but when I coded it into a page there was a 6-7cm gap between the words and the drop down box. How can I change this so that there is not a large gap?

12-04-2002, 09:14 PM
We would need to see the code to help (!)

13-04-2002, 10:32 AM
<SCRIPT LANGUAGE='JavaScript'>
<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</SCRIPT>
</HEAD>
<BODY>
<center>
<form name='form'>
<select name='site' size=1>
<option value=''>Go to....
<option value=''>My Favourite Links on the Net
<option value='http://www.nzpages.net'>NZPAGES-<br><I> A web hosting service </I>
<option value='http://www.xtra.co.nz'>Xtra-<br><I> A great ISP </I>
<option value='http://www.redalert2.com'>C&C Red Alert 2-<br><I> A great war game </I>
<option value='http://www.westwood.com'>Westwood-<br><I> A Game Studio </I>
<option value='http://www.ea.com'>Electronic Arts-<br><I> A Game Studio </I>
<option value='http://www.tuxboxproject.com'>Tux Box Project-<br><I> An upcoming Linux OS <br> Gaming system </I>
<option value='http://www.ghostrecon.com'>Ghost Recon-<br><I> A great war game </I>
<option value='http://www.ubisoft.com'>Ubisoft-<br><I> A Game Studio </I>
<option value='http://www.cnn.com'>CNN-<br><I> A News Service </I>
<option value='http://www.intel.com'>Intel-<br><I> Pentium/Celeron Range of CPU Maker </I>
<option value='http://www.netguide.co.nz'>Netguide-<br><I> A great Internet Magazine </I>
<option value='http://www.pcworld.co.nz'>PC WORLD-<br><I> A great PC magazine </I>
<option value='http://www.javascript.com'>Javascript.com
</select>
<input type=button value='Go!' onClick='javascript:formHandler(this)'>
</form>




Here is the code