Re: Javascript Drop Down Email Links

by "Kim Coleman" <kim(at)>

 Date:  Thu, 21 Sep 2000 23:32:53 -0400
 To:  "Jeremy Pratte" <artman(at)>,
 References:  Clearpages
  todo: View Thread, Original

I frequently use the dropdown menu approach myself and have a good and
simple script that works well with mailto links

check out the following links for examples  -  the Avalon Staff menu shows the
mailto: link (most of the other links aren't working as the site is still
under construction) - no mailto: links but another completely
working example of the dropdown script.  It just uses the normal "mailto: "

Any questions,let me know


----- Original Message -----
From: "Jeremy Pratte" <artman(at)>
To: <hwg-techniques(at)>
Sent: Friday, September 22, 2000 1:49 AM
Subject: Javascript Drop Down Email Links

> I hope one of you guys can help me with this:
> At my web design firm, often we like to use javascript in conjunction with
> drop down menu as a nice way to organize a long list of links.  We do this
> fairly often and never have any problems except when we want there to be
> mailto: email links.  For some reason, with this particular script, if you
> try to reference an email link, you get an error.
> My question is, can anybody who knows this script (there'll be a sample
> below) tell me how to modify it so email links work, or if you know a
> completely different script that would help.
> Here is some sample code:
> (this is the code inbetween the header tags)
> <script LANGUAGE="JavaScript">
> function leapto(form) {
> var myindex=form.dest.selectedIndex
> parent.location.href=(form.dest.options[myindex].value);
> }
> // -->
> </script>
> and this is the form/javascript code in the actual HTML page:
> <select NAME="dest" SIZE="1" onChange="leapto(this.form)"
> 10pt">
>               <option selected value="Select Your Zip Code">Select Your
>               Louis Zip Code</option>
>               <option
> value="mailto:tshambarger(at)">63005</option>
>                 <option
> value="mailto:tshambarger(at)">63011</option>
>               </select>
> Now this code works if it's just an .htm or .html link, as in <option
> value="page">Page</option> but not with mailto links.
> So can anybody help?
> Jeremy Pratte
> artman(at)

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