For the script:
<script language="JavaS cript">
function pullPage(){
var arrayLength=doc ument.teamSelec tionF.teamSelec tionS.length;
var pageNav = new Array(arrayLeng th);
var
gotoNum=documen t.teamSelection F.teamSelection S.options[document.teamSe lectionF.teamSe lectionS.select edIndex].value;
pageNav["null"]="http://www.tandtsports .com";
pageNav["Cougars"]="http://www.tandtsports .com/Cougars.html";
pageNav["Mavericks"]="http://www.tandtsports .com/Mavericks.html" ;
pageNav["Shortcuts"]="http://www.tandtsports .com/Shortcuts.html" ;
window.open(pag eNav[gotoNum]);
}
</script>
And in the body:
<form name="teamSelec tionF">Please Select A team:
<select name="teamSelec tionS" size="1"onChang e="pullPage() " >
<option value="null" selected>Team_N ame</option>
<option value="Cougars" >Cougars</option>
<option value="Maverick s">Mavericks </option>
<option value="Shortcut s">Shortcuts </option>
</select>
</form>
The intent is to produce a function whereby all I have to do create a
new pageNav array member that will naturally have an index value the
same as option value. I believe this will make maintaining a team list
much easier with the array usage within the window.open method. I was
working on this a few weeks ago and posted a message based on this
code. It works fine with the most recent IE and Netscape, but someone
emailed me and warned me of potential problem. I guess I deleted that
email so I was wondering if anyone could point out any potential
problems.
<script language="JavaS cript">
function pullPage(){
var arrayLength=doc ument.teamSelec tionF.teamSelec tionS.length;
var pageNav = new Array(arrayLeng th);
var
gotoNum=documen t.teamSelection F.teamSelection S.options[document.teamSe lectionF.teamSe lectionS.select edIndex].value;
pageNav["null"]="http://www.tandtsports .com";
pageNav["Cougars"]="http://www.tandtsports .com/Cougars.html";
pageNav["Mavericks"]="http://www.tandtsports .com/Mavericks.html" ;
pageNav["Shortcuts"]="http://www.tandtsports .com/Shortcuts.html" ;
window.open(pag eNav[gotoNum]);
}
</script>
And in the body:
<form name="teamSelec tionF">Please Select A team:
<select name="teamSelec tionS" size="1"onChang e="pullPage() " >
<option value="null" selected>Team_N ame</option>
<option value="Cougars" >Cougars</option>
<option value="Maverick s">Mavericks </option>
<option value="Shortcut s">Shortcuts </option>
</select>
</form>
The intent is to produce a function whereby all I have to do create a
new pageNav array member that will naturally have an index value the
same as option value. I believe this will make maintaining a team list
much easier with the array usage within the window.open method. I was
working on this a few weeks ago and posted a message based on this
code. It works fine with the most recent IE and Netscape, but someone
emailed me and warned me of potential problem. I guess I deleted that
email so I was wondering if anyone could point out any potential
problems.
Comment