Re: Loading into a frame from a drop-down menu.

by 2Nerotik <2nerotik(at)nisa.net>

 Date:  Thu, 13 Jan 2000 17:01:23 -0800
 To:  hwg-techniques(at)hwg.org
 In-Reply-To:  haghill
  todo: View Thread, Original
Try this script and form example, works in NN, IE & Opera:

< Script language="JavaScript">
<!--
function surfto(form) {
              var myindex=form.dest.selectedIndex
              window.open(form.dest.options[myindex].value, target="CONTENT");
}
//-->
< /SCRIPT>

< FORM NAME="myform">
         <SELECT NAME="dest" onchange="surfto(this.form)">
                 <OPTION SELECTED>Drop Down Menu
                 <OPTION VALUE="item1.html">Menu Item 1
         </SELECT>
< /FORM>

Just change where it says target="CONTENT" to the name of the frame you want
to target.

At 10:56 PM 13/01/2000 +0000, Martyn Thompson wrote:
>Does anyone have a script for loading into a target frame from a drop-down
>menu in another frame?
>
>I can't see anywhere to add the 'target' attribute and when I have, it
>doesn't work.


.oOo.
|| I'm not schizophrenic. You only think we are.
||
||  Addicted 2 Swing ---> http://www.nisa.net/~2nerotik/
||  Fontaholic ? ---> http://www.fontsanon.com
||  HTML Writers Guild ---> http://www.hwg.org

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