Re: Collapsible menu without frames for IE4?
by gchurchman(at)medseek.com (Gary Churchman)
|
Date: |
Wed, 22 Mar 2000 09:02:41 -0800 |
To: |
"Anderson, Stuart" <Stuart.Anderson(at)dva.gov.au>, <hwg-basics(at)hwg.org>, <hwg-languages(at)hwg.org>, <hwg-techniques(at)hwg.org> |
References: |
NSTASV1 |
|
todo: View
Thread,
Original
|
|
<explanation>
Put this script in the head of your document:
</explanation>
<script language="JavaScript">
<!---
function GoToSite()
{
var xxx;
var zzz;
zzz=document.hotlink.SiteURL;
xxx=document.hotlink.SiteURL.selectedIndex;
file://alert(zzz[xxx].value);
file://xxx=hotlink.SiteURL.value;
location.href=zzz[xxx].value;
return true;
}
--->
</script>
<explanation>
Create the following form at the location where you want the collapsable
menu to display. The form is given an action of "Dummy" to satisfy the
inferior analytical capabilities of Netscape. You can build a table around
the form, or include it in the table structure that constrains your page to
cause the menu to stay where you want it. The "onChange event in the select
tag causes the user to jump to the link as soon as it is selected. If you
would rather use a button or clickable graphic to initiate the jump to the
link, delete the onChange event in the select tag and create a new submit
button: "<input type="submit" value="Click Here To Jump To Linked Page"
onClick="GoToSite();">", or clickable graphic (substitute type="image" and
the graphic's src= for the value).
</explanation>
<form name="hotlink" method="post" action="dummy">
<select name="SiteURL" onChange="GoToSite();">
<option value="">Select From List of Links</option>
<option value="http://www.yourURL.com">Your Link</option>
<!---Add as many options as you want to--->
</select>
</form>
I use a lot of collapsable menus, but this one is by far the most robust.
It has a built in error trap that returns a "check-it" box when a URL is not
valid.
HTH
Gary Churchman
Director, Production and Design
MedSeek
gchurchman(at)medseek.com
www.medseek.com
----- Original Message -----
From: "Anderson, Stuart" <Stuart.Anderson(at)dva.gov.au>
To: <hwg-basics(at)hwg.org>; <hwg-languages(at)hwg.org>; <hwg-techniques(at)hwg.org>
Sent: Tuesday, March 21, 2000 5:33 PM
Subject: Collapsible menu without frames for IE4?
> I am looking for a script which will allow collapsible javascript menus in
> IE4. Most of those I have seen use frames. This is a problem for me as
our
> site guidelines specify that we shall not use frames. I have searched the
> web and the archives and the law of diminishing returns is setting in
>
>
> Stuart Anderson
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA