Re: Javascript Dropdown Jump Menu with targeting feature.

by "Jan Morell" <jan_man(at)bellsouth.net>

 Date:  Fri, 19 Jan 2001 15:43:28 -0500
 To:  "Cyanide _7" <leo7278(at)hotmail.com>
 Cc:  <hwg-languages(at)hwg.org>
 References:  hotmail
  todo: View Thread, Original
Hi Cyanide _7,

Perfect.  Works like a charm.  You 'Da Man

Thanks,

Jan

----- Original Message -----
From: "Cyanide _7" <leo7278(at)hotmail.com>
To: <jan_man(at)bellsouth.net>
Cc: <hwg-languages(at)hwg.org>
Sent: Friday, January 19, 2001 4:24 PM
Subject: Re: Javascript Dropdown Jump Menu with targeting feature.


try this:

<SCRIPT>
<!--
function jump(menu){
  var loc = menu[menu.selectedIndex].value.split("|");
  if(loc.length == 2)
    window.open(loc[1], loc[0]);
}
//-->
</SCRIPT>

<FORM>
<SELECT onChange="jump(this)">
  <OPTION>Choose your destination:</OPTION>
  <OPTION VALUE="_self|page">Page</OPTION>
  <OPTION VALUE="main|page">Home</OPTION>
  <OPTION VALUE="frame2|page">Page</OPTION>
  <OPTION VALUE="_blank|http://www.domain.com">domain.com</OPTION>
</SELECT>
</FORM>

should work for standard _top and _blank targets, frames, and named windows.
just put the target and destination, seperated by a pipe. - Cyanide_7


>Hi Listmenbers,
>
>I am looking for a javascript dropdown jump menu that would allow me to
>specify different targets for each of the selections.
>
>I have looked a a few, but I want to be able to have some of the selections
>open in the same frame, and others to open in a new browser window.
>
>Does anyone know of a script that I can use.
>
>Jan Morell
>
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA