drop down menu

They have: 2 posts

Joined: Oct 1999

Sorry for the newbie question here, but where would I get the code for a mouseover drop menu for my TOC that would open the link in a new window? Thanks in advance.
TJ

They have: 48 posts

Joined: Dec 1999

You need something like this in the <head> section:

code:

<script language="JavaScript">
<!-- hidden
function goTo()
 {
  var newUrl=document.formName.menuName.options[document.formName.menuName.selectedIndex].value;
  window.open(newUrl,'windowName','Property1,Property2');
 }
//-->
</script>
[/code]

The properties of the new window are listed on the following page:
 www.pageresource.com/jscript/jwinopen.htm 

Then in the <body> section you will need a drop down menu like this:
code:
<form name="formName">
<select name="menuName">
<option selected value="http://www.yoursite.com/page1.html">Page 1
<option value="http://www.yoursite.com/page2.html">Page 2
<option valuvalue="http://www.yoursite.com/page3.html">Page 3
</select>
<input type="button" value="Go" onClick="goTo()">
</form>
[/code]

------------------
Do you want to have fun?
TomWorld 

Do you want to have fun?
TomWorld

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.