aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Capturing Selections from several multiple select boxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Capturing Selections from several multiple select boxes" Watch "Capturing Selections from several multiple select boxes" New topic
Author

Capturing Selections from several multiple select boxes

M. Cotton
Greenhorn

Joined: Apr 02, 2007
Posts: 6
Hi,
I am using javascript to capture multiple selections from a select box. I have the javascript written to capture from one select box but I have two other multiple select boxes on the form that I need to capture from as well. I am not sure how to go about doing this. Any suggestions would be greatly appreciated.
Thanks!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61612
    
  67

What's the issue? if you figured out how to do it for one, what's the problem with applying the same logic to another?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
M. Cotton
Greenhorn

Joined: Apr 02, 2007
Posts: 6
I guess my question is do I need to recreate the same function 3 times and call it something else each time? Also, I have one onclick event which takes everything from the first select box, do I need to do some sort of loop to catch all three select boxes?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
what does you code look like now?

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61612
    
  67

Write a function that you pass the element reference to. There's rarely any need to copy/paste code.
M. Cotton
Greenhorn

Joined: Apr 02, 2007
Posts: 6
I thought I had it right, but now the first box is giving me an error message. Maybe I have just been at this to long and it will make sense in the morning ;-)
 
wood burning stoves
 
subject: Capturing Selections from several multiple select boxes