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

by "Jeff Lash" <jeff(at)jefflash.com>

 Date:  Thu, 13 Jan 2000 19:41:58 -0500
 To:  <hwg-techniques(at)hwg.org>
 References:  haghill
  todo: View Thread, Original
Try something like this:
- Add this code inside the body tag:
onLoad="document.forms[0].navbox.selectedIndex = 0
- Add the following code in the page itself where you want the drop-down

<form method="post">
<select name="navbox" size="1"
onchange="window.open(this.options[this.selectedIndex].value,'_self')">
<option selected value>Here is your drop-down
<option value="./">Home Page
<option value="other.html">Another
</select>
</form>

Just replace the "_self" in the second line with the name of the frame that
you want the link to load into (as it's written, it will load inside the
frame it's in).

If that doesn't work, check out these two scripts I dug up and see if they
do the trick:

http://javascript.internet.com/navigation/menu-frames.html
http://javascript.internet.com/navigation/menu-auto-frames.html

Hope this helps...

.jeff.

----- Original Message -----
From: Martyn Thompson <martyn(at)haghill.co.uk>
To: <hwg-techniques(at)hwg.org>
Sent: Thursday, January 13, 2000 5:56 PM
Subject: Loading into a frame from a drop-down menu.


> 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.
> =========================
> Regards...
> Martyn Thompson
> E-mail: martyn(at)haghill.co.uk
> URL: http://www.haghill.co.uk
> =========================
>

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