[Javascript] How to make a pulldown menu reset?

Rodney Myers rmyers at i-way.co.uk
Wed Apr 4 03:43:10 CDT 2001


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
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript

-- 
Shop at ssistant Add-ons and Developer Workshops
http://www.aflyingstart.net/addons/
STILL PLACES OPEN on Fri 27 April workshop

Courses in April 
Mon 23  : Making a Start in E-Commerce with Shop at ssistant
Tue 24  : Meeting Business Needs with the Shop at ssistant Classic system
Wed 25 : Building Better Shopping Pages with Shop at ssistant Classic


Booking for these Shop at ssistant Classic courses at 
http://www.shopassistant.net/training/  
Or call 01256 880770

Rodney Myers
Based in Oxford, England
Technical Director, Shop at ssistant eCommerce Solutions




More information about the Javascript mailing list