/    Sign up×
Community /Pin to ProfileBookmark

Strange… Script doesn’t work

<!– This part of script goes into the head –>

[SIZE=1]<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
function leapto(form) {
var myindex=form.dest.selectedIndex
parent.dbmain.location.href=(form.dest.options[myindex].value);
}
// End –>
</SCRIPT>[/SIZE]

<!– And this script goes in the body –>

[SIZE=1]<FORM NAME=”myform”>
<font class=”10pt”>&nbsp;</font>Sort By:
<SELECT NAME=”dest” SIZE=1 onChange=”leapto(this.form)”>
<OPTION VALUE=”#” SELECTED>ALPHABET:
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=#;4=name;5=asc”>» #
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=A;4=name;5=asc”>» A
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=B;4=name;5=asc”>» B
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=C;4=name;5=asc”>» C
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=D;4=name;5=asc”>» D
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=E;4=name;5=asc”>» E
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=F;4=name;5=asc”>» F
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=G;4=name;5=asc”>» G
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=H;4=name;5=asc”>» H
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=I;4=name;5=asc”>» I
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=J;4=name;5=asc”>» J
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=K;4=name;5=asc”>» K
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=L;4=name;5=asc”>» L
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=M;4=name;5=asc”>» M
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=N;4=name;5=asc”>» N
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=O;4=name;5=asc”>» O
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=P;4=name;5=asc”>» P
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=Q;4=name;5=asc”>» Q
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=R;4=name;5=asc”>» R
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=S;4=name;5=asc”>» S
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=T;4=name;5=asc”>» T
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=U;4=name;5=asc”>» U
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=V;4=name;5=asc”>» V
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=W;4=name;5=asc”>» W
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=X;4=name;5=asc”>» X
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=Y;4=name;5=asc”>» Y
<OPTION VALUE=”browse.php?1=<?php echo”$OpSystem”; ?>;2=letter;3=Z;4=name;5=asc”>» Z
</SELECT>
</FORM>[/SIZE]

My error message: [B]‘form.dest.options’is not an object[/B]

Can someone – anyone – help me? It makes really no sense. I found this script on javascript source (I’ll give the link if you want me to), and it worked okay there… Why won’t this work on my site then?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@Rick_BullNov 26.2002 — [b]my[/b]form.dest.options (in the <script> bit) should fix it.
×

Success!

Help @Sovereign 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 6.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...