PDA

View Full Version : Dropdown menus...??


R3FLUX
03-05-2002, 07:44 PM
Im trying to add menus/list in DW and i thought i did evert thing right in the code but its not working. anyway heres a posrtion of the code ::

<form name="form1">
<div align="center">
<select onChange="navChange2(this); return true;" name="drop" size="1" style="background-color: #FFFFFF; color: #999999; font-family: Verdana, Arial; font-size: 10px; border: 1 solid #999999">
<option selected>----------</option>
<option value=http://www.Talkloud.net>Talkloud</option>
<option value=http://www.pixeljunction.com>PJ</option>
<option value=http://www.Macfora.com>Macfora</option>
<option value=http://www.Somethingleet.com>S. Leet</option>
<option value=http://forums.valkyrec.net>Valkyrec</option>
<option value=http://www.pctechtalk.com>PC Talk</option>
<option value=http://www.photoshoptechniques.com>PS Tech.</option>
<option value=http://www.razorart.com>Razor Art</option>
<option value=http://www.method-ex.com>Method Ex</option>
<option value=http://www.gurusnetwork.com>Gurus</option>
</select>
</div>
</form> :shocked:

imported_Phil
03-05-2002, 08:47 PM
You didn't add a submit or a go button, if that is your problem?

R3FLUX
03-05-2002, 09:02 PM
a button is not neccessary though

R3FLUX
03-05-2002, 09:11 PM
i fogot to ad the script codeing! eek !

<script language="javascript">
<!--

function navChange2(popup) {
if (popup.options[popup.selectedIndex].value != "")
{
window.open(popup.options[popup.selectedIndex].value, '_blank');
popup.selectedIndex=0;
}
}

function navChange3(popup) {
if (popup.options[popup.selectedIndex].value != "")
{
window.open(popup.options[popup.selectedIndex].value, '_top');
popup.selectedIndex=0;
}
}

//-->
</script>

imported_Phil
03-05-2002, 09:12 PM
So what are you refering to when you say its not working?

Do you basically want the drop down menu without the submit button like it is now but yours isn't preforming the action (URL)?

Phil

R3FLUX
03-06-2002, 01:54 AM
yeah it wasnt going to the website

Dan203
04-01-2002, 10:37 PM
First off you should add quotes arround the value tags like so...

<form name="form1">
<div align="center">
<select onChange="navChange(this); return true;" name="drop" size="1" style="background-color: #FFFFFF; color: #999999; font-family: Verdana, Arial; font-size: 10px; border: 1 solid #999999">
<option selected>----------</option>
<option value="http://www.Talkloud.net">Talkloud</option>
<option value="http://www.pixeljunction.com">PJ</option>
<option value="http://www.Macfora.com">Macfora</option>
<option value="http://www.Somethingleet.com">S. Leet</option>
<option value="http://forums.valkyrec.net">Valkyrec</option>
<option value="http://www.pctechtalk.com">PC Talk</option>
<option value="http://www.photoshoptechniques.com">PS Tech.</option>
<option value="http://www.razorart.com">Razor Art</option>
<option value="http://www.method-ex.com">Method Ex</option>
<option value="http://www.gurusnetwork.com">Gurus</option>
</select>
</div>
</form>


Next change your JavaScript to this...

<script language="javascript">
<!--
function navChange(drop) {
if (drop.options[drop.selectedIndex].value != ""){
window.open(drop.options[drop.selectedIndex].value, "_blank");
drop.selectedIndex = 0;
}
}
//-->
</script>


I tested it here and it works in both IE6 and Netscape 6.2. :)

Dan