Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 13th, 2004, 06:00 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default three independant select menus

Hi, I tried looking in previous threads to find my answer but to no avail. So here I go again requesting your help.

I have three independant list menus from which to choose from.
The results of a selection are driven by the

" onChange="checkMenu(this.options[this.selectedIndex].value) " javascript call, and are loaded in another frame.
So far, all is fine.

My problem is when I've made a first selection and would like to make another selection, from say another of the list menus, The first selection doesn't "reset" itself. It stays as the first element in that drop-down but is no longer clickable.

Ideally I would like that once a selection has been made; ALL drop-downs reset themselves.

Any help would greatly be appreciated,

Thanks
nancy






Reply With Quote
  #2 (permalink)  
Old December 13th, 2004, 10:07 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

"ALL drop-downs reset themselves"

Including the one you just selected from?

If so, put the menus in a form and change the onChange handler to this:
onChange="checkMenu(this.options[this.selectedIndex].value);this.form.reset()

hth,

-Snib - http://www.snibworks.com
Where will you be in 100 years?
Reply With Quote
  #3 (permalink)  
Old December 14th, 2004, 10:12 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Snib for the quick response, but I'd tried that and it still doesn't reset the select menus to there initial state??

Reply With Quote
  #4 (permalink)  
Old December 14th, 2004, 11:10 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I'm assuming your select menus look similar to this:

<select name='blah' onchange='blah'>
<option>blah</option>
<option>blah blah</option>
[other options]
</select>

Wrap ALL of the select menus in a form like this:

<form method='post' action='/'>
[all 3 select menus here]
</form>

Then make sure the onChange looks exactly like this:
onChange="checkMenu(this.options[this.selectedIndex].value);this.form.reset()"

If this doesn't work, please post an example and I'll take a look.

-Snib - http://www.snibworks.com
Where will you be in 100 years?
Reply With Quote
  #5 (permalink)  
Old December 14th, 2004, 11:36 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Snib... It worked!!
Thanks sooo much!


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Images in menus EricJ VB How-To 13 April 26th, 2005 04:09 AM
sub menus matshediso HTML Code Clinic 2 January 31st, 2005 05:15 AM
Popup menus over <select> boxes tdaustin Javascript How-To 6 July 7th, 2004 06:30 PM
Menus Frank Schmuck BOOK: Beginning ASP.NET 1.0 1 June 6th, 2003 01:29 PM



All times are GMT -4. The time now is 01:57 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.