Click to See Complete Forum and Search --> : Drop Down Menu not working


tlacks
04-22-2003, 04:54 PM
I am ahving a scripting problem with 2 drop down menues on my City's homepage. I'm being told there is a nul value but the second drop down works correctly! Please help!
The URL is:
http://www.cityofopalocka.org/homepage.htm
and the menues are "C.O.O.L. Links" and
"DEPARTMENTS"
Any assistance would be GREATLY appreciated!

Jona
04-22-2003, 04:59 PM
My question is, where is your question?

AdamBrill
04-22-2003, 05:12 PM
The problem is in the gotoLink(form) function. In that function, which you call when either of the go buttons are clicked, you tell it to read it out of the second drop down box. You can either add another function for the first drop down box or send something else along so you know with button is pressed. If you need more help with this, let me know. :)

BTW, the link is http://www.cityofopalocka.org/homepage.html, just so everyone knows... You had .htm ;)

Jona
04-22-2003, 05:18 PM
Adam, I figured out the link, but I didn't test the script--I didn't know exactly what he was after.

AdamBrill
04-22-2003, 05:24 PM
Jona, if you select a link from the top box and then click go, it will take you to the place where the second drop down box is at. Or, if the bottom one is on the default one, it will cause an error... ;)

Jona
04-22-2003, 05:26 PM
Oh, I see. I didn't notice that.. Totally confusing, if you ask me.

By the way, let's cealibrate my 1,000th post! LOL. :p

tlacks
04-22-2003, 05:27 PM
Adam -
I'm at a complete loss! Would you please contact me at ICQ or e-mail with a suggested fix?

DrDaMour
04-22-2003, 07:15 PM
you have two functions named gotoLink using differnet list boxes

they each appear right after the input buttons

change the first set to gotolinka one to

so it should look like below


<option value="http://www.cityofopalocka.org/clerk.htm">City Clerk</option>
</select> <input TYPE="button" VALUE="Go" ONCLICK="gotoLinka(this.form)" NAME="button"></p>
<script language="JavaScript">
<!--
function gotoLinka(form) {
var OptionIndex=form.ListBox1.selectedIndex;
parent.location = form.ListBox1.options[OptionIndex].value;}
//-->