Hello!
Started JS coding 3 hours ago! Doing ok except for a small niggly problem...
The html page is built as a frameset - header along the top, menu on the left, mainarea on the right.
I have the following JS code within the head tags of the menu page...
<code>
<script language=javascript>
function menujump()
{
parent.mainarea.location.href=document.nav.menuList[document.nav.menuList.selectedIndex].value;}
</script>
</code>
A little later comes the following HTML...
<code>
<select name="menuList" id="">
<option value="test1.html">Option 1</option>
<option value="test2.html">Option 2</option>
<option value="test3.html">Option 3</option>
</select>
</code>
Even later in the HTML comes the following...
<code>
<input type="image" src="images/buttons/gobutton.gif" alt="Go" border=0 onclick="menujump()">
</code>
Everything functions fine. The page displayed in the 'mainarea' frame changes to whatever page has been selected from the dropdown list. The problem is that the item shown in the drop down list always reverts back to the first one.
How can I get the selected element to stay visible? Tried various things but can't find a way to do it.
Anyone have any ideas?
Cheers,
Dave.
mailto:dave.ring@barclays.co.uk
Started JS coding 3 hours ago! Doing ok except for a small niggly problem...
The html page is built as a frameset - header along the top, menu on the left, mainarea on the right.
I have the following JS code within the head tags of the menu page...
<code>
<script language=javascript>
function menujump()
{
parent.mainarea.location.href=document.nav.menuList[document.nav.menuList.selectedIndex].value;}
</script>
</code>
A little later comes the following HTML...
<code>
<select name="menuList" id="">
<option value="test1.html">Option 1</option>
<option value="test2.html">Option 2</option>
<option value="test3.html">Option 3</option>
</select>
</code>
Even later in the HTML comes the following...
<code>
<input type="image" src="images/buttons/gobutton.gif" alt="Go" border=0 onclick="menujump()">
</code>
Everything functions fine. The page displayed in the 'mainarea' frame changes to whatever page has been selected from the dropdown list. The problem is that the item shown in the drop down list always reverts back to the first one.
How can I get the selected element to stay visible? Tried various things but can't find a way to do it.
Anyone have any ideas?
Cheers,
Dave.
mailto:dave.ring@barclays.co.uk