OK,
I am trying to write a drop-down box that changes the page url onClick. So
far so good, I have the code for that. What I need to know is how do I make
it load it a different frame? I have about 700 existing HTML pages, and do
not want to go in and code a menu on all of them, so I want to make a menu
in a left frame (named left), and have the items load in the main frame
(named main). Below is the code I have thus far. Any help would be
appreiciated.
Thanks in adavnce,
ML
<script language="JavaS cript">
function openDir( form ) {
var newIndex = form.menu1.sele ctedIndex;
if ( newIndex == 0 ) {
alert( "Please select a location!" );
} else {
cururl = form.menu1.opti ons[ newIndex ].value;
window.location .assign( cururl );
}
}
</script>
<form name="menu">
<select name="menu1" size="1"
onChange="openD ir( this.form )">
<option>1 - 49</option>
<option value="0001/index.html">000 1</option>
<option value="0002/index.html">000 2</option>
<option value="0003/index.html">000 3</option>
</select>
I am trying to write a drop-down box that changes the page url onClick. So
far so good, I have the code for that. What I need to know is how do I make
it load it a different frame? I have about 700 existing HTML pages, and do
not want to go in and code a menu on all of them, so I want to make a menu
in a left frame (named left), and have the items load in the main frame
(named main). Below is the code I have thus far. Any help would be
appreiciated.
Thanks in adavnce,
ML
<script language="JavaS cript">
function openDir( form ) {
var newIndex = form.menu1.sele ctedIndex;
if ( newIndex == 0 ) {
alert( "Please select a location!" );
} else {
cururl = form.menu1.opti ons[ newIndex ].value;
window.location .assign( cururl );
}
}
</script>
<form name="menu">
<select name="menu1" size="1"
onChange="openD ir( this.form )">
<option>1 - 49</option>
<option value="0001/index.html">000 1</option>
<option value="0002/index.html">000 2</option>
<option value="0003/index.html">000 3</option>
</select>
Comment