dubbel pulldown menu in frame

Status
Niet open voor verdere reacties.

droogers

Gebruiker
Lid geworden
27 jun 2001
Berichten
173
De onderstaande code heb ik gevonden op internet. Nu wil ik graag dat de code verwijst naar het frame 'info3' waar de link geopend moet worden. Hoe moet ik de code aanpassen? De pulldown menus staan in het frame 'top1'.
<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!--
v=false;
//-->
</SCRIPT>

<SCRIPT LANGUAGE="JavaScript1.1">
<!--
if (typeof(Option)+"" != "undefined") v=true;
//-->
</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">

<!-- Original: webreference.com -->
<!-- Web Site: http://webreference.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
if(v){a=new Array();aln=0;}
function getFormNum (formName) {
formNum =-1;
for (i=0;i<document.forms.length;i++){
tempForm = document.forms;
if (formName == tempForm) {
formNum = i;
correctForm = tempForm;
break;
}
}
return formNum;
}
function jmp(formName,elementNum) {
getFormNum(formName);
if (formNum>=0) {
with (document.forms[formNum].elements[elementNum]) {
i=selectedIndex;
if (i>=0) location=options.value;
}
}
}
function O(txt,url) {
a[k]=new Option(txt,url);k++;
}
function relate(formName,elementNum,j) {
if(v) {
k=1;
if(j==0) { // default category item
a=new Array();
O("Pick Item --->","");
}

if(j==1) { // 1st category items
a=new Array();
O("Pick Item --->","");
O("Buttons","http://javascript.internet.com/buttons/");
O("Clocks","http://javascript.internet.com/clocks/");
O("Cookies","http://javascript.internet.com/cookies/");
O("Forms","http://javascript.internet.com/forms/");
O("Games","http://javascript.internet.com/games/");
O("Messages","http://javascript.internet.com/messages/");
O("Miscellaneous","http://javascript.internet.com/miscellaneous/");
O("Navigation","http://javascript.internet.com/navigation/");
O("Page Details","http://javascript.internet.com/page-details/");
O("Pass. Protec.","http://javascript.internet.com/passwords/");
O("Scrolls","http://javascript.internet.com/scrolls/");
O("User Details","http://javascript.internet.com/user-details/");
O("Table Of Contents","http://javascript.internet.com/toc.html");
}

if(j==2) { // 2nd category items
a=new Array();
O("Pick Item --->","");
O("How Do I...?","http://forums.internet.com/cgi-bin/WebX?13@^265342@.ee6b7af");
O("Script Help","http://forums.internet.com/cgi-bin/WebX?13@^265342@.ee6b7ab");
O("Script Requests","http://forums.internet.com/cgi-bin/WebX?13@^265342@.ee6b7ad");
O("Intro to JavaScript","http://forums.internet.com/cgi-bin/WebX?13@^265342@.ee6b7a7");
O("What's New?","http://forums.internet.com/cgi-bin/WebX?13@^265342@.ee6b7a9");
}

if(j==3) { // 3rd category items
a=new Array();
O("Pick Item --->","");
O("JS Question?","http://forums.internet.com/cgi-bin/WebX?14@^3027@.ee6b313");
O("JS Contribution","http://javascript.internet.com/contribute.html");
O("Site Comments","http://javascript.internet.com/contact-us.html");
O("Other ...","http://javascript.internet.com/feedback.html");
}

aln2=a.length;
getFormNum(formName);
if (formNum>=0) {
formNum = formNum + 1;
with (document.forms[formNum].elements[elementNum]) {
for (var i=options.length-1;i>0;i--) options=null;
for (var i=1;i<aln2;i++) options[i-1]=a;
options[0].selected=true;
}
}
} else {
jmp(formName,elementNum);
}
}
// End -->
</SCRIPT>
</head>

<!-- STEP TWO: Put this code into the BODY of your HTML document -->

<BODY>

<center>
<table border=0>
<tr valign=top>
<TD align=center><form name=f1 method=post action="" onSubmit="return false;">
<select name=m1 onChange="relate(this.form,0,this.selectedIndex); document.f2.m2.focus();">
<option value="/">Pick Category --->
<option value="/">JavaScripts
<option value="/">Message Forum
<option value="/">Feedback Form
</select></form></td>

<td align=center> <b>then</b> </td>

<td><form name=f2 method=post action="" onsubmit="return false;">
<select name="m2" onchange="jmp(this.form,0)">
<option value="/">Pick Item --->

<!--

Put a blank item (like below) for the MAXIMUM
number of items in one of your categories.
i.e. If your "largest" menu contains 5 items,
include 5 blank lines here. For 10, include
10, and so on.

-->

<option value="/">
<option value="/">
<option value="/">
<option value="/">
<option value="/">
<option value="/">
<option value="/">
<option value="/">
<option value="/">
<option value="/">
<option value="/">
<option value="/">
<option value="/">

</select></form></td>

</tr>
</table>
</center>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 4.56 KB -->
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan