/    Sign up×
Community /Pin to ProfileBookmark

Drop Down Menu not working

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:
[url]http://www.cityofopalocka.org/homepage.htm[/url]
and the menues are “C.O.O.L. Links” and
“DEPARTMENTS”
Any assistance would be GREATLY appreciated!

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@JonaApr 22.2003 — My question is, where is your question?
Copy linkTweet thisAlerts:
@AdamBrillApr 22.2003 — 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 [URL=http://www.cityofopalocka.org/homepage.html]http://www.cityofopalocka.org/homepage.html[/URL], just so everyone knows... You had .htm ?
Copy linkTweet thisAlerts:
@JonaApr 22.2003 — Adam, I figured out the link, but I didn't test the script--I didn't know exactly what he was after.
Copy linkTweet thisAlerts:
@AdamBrillApr 22.2003 — 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... ?
Copy linkTweet thisAlerts:
@JonaApr 22.2003 — 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
Copy linkTweet thisAlerts:
@tlacksauthorApr 22.2003 — Adam -

I'm at a complete loss! Would you please contact me at ICQ or e-mail with a suggested fix?
Copy linkTweet thisAlerts:
@DrDaMourApr 23.2003 — 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;}

//-->
×

Success!

Help @tlacks spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...