[Javascript] How to make a pulldown menu reset?
David L.
mrpooh at hotmail.com
Thu Apr 5 02:34:12 CDT 2001
I tried using your suggestion, both within the <option> tag as well as in my
function code and it didn't do anything. any other ideas?
----Original Message Follows----
From: Rodney Myers <rmyers at i-way.co.uk>
Reply-To: javascript at LaTech.edu
To: javascript at LaTech.edu
Subject: Re: [Javascript] How to make a pulldown menu reset?
Date: Wed, 04 Apr 2001 09:43:10 +0100
David,
Try in the SELECT
onchange="opengallery(this.form.galleries,700,700);this.selectedIndex=0;">
Rodney
"David L." wrote:
>
> When I have a pulldown menu that is used in conjunction with popping open
a
> separate window (page content based on the option selected), the pulldown
> menu will stay stuck on the "selection" unless I have the page reload as
> part of how I define my function.
>
> What lines of code can I use to make the pulldown menu reset to the
default
> item?
>
> Here is my current code:
> <script language=javascript>
> <!--
>
> function opengallery(newgallery,winwidth,winheight) {
> gallery = newgallery.options[newgallery.selectedIndex].value
>
> if (gallery != "") {
>
window.open(gallery,"gallerywindow","winwidth,winheight");
> window.location.href='flash_photonav.html'; return false;
> }
> }
>
> //end hiding-->
> </script>
>
> Here is the HTML:
> <!--
> <select name="galleries"
> onchange="opengallery(this.form.galleries,700,700)">
> <option value="" selected>view a gallery
> <option> _ _ _ _ _ _
> <option value=people.html>portrait gallery I
> <option value=people_II.html>portrait gallery II
> </select>
>
> -->
>
> -- thanks, David
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
More information about the Javascript
mailing list