IBM developerWorks
           Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old December 3rd, 2002, 06:42 PM
winddancer winddancer is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Germany
Posts: 201 winddancer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 14 m 20 sec
Reputation Power: 6
Send a message via ICQ to winddancer
form problem - reset select forms when one is selected...

hi all,

i have been browsing several javascript sites for the past few hours! and i couldn't find a solution.

i have a form with different select fields.
these are all dynamicaly generated from a mysql db.

There are two problems:

First: these select fields contain up to three different types of information.

- size
- color
- accessoires

However there are DIFFERENT kinds of sizes.
Size Range A
Size Range B
Size Range C

each range contains various numbers.

let's assume we have 3 select fields on our page.

one with color options.
two with size ranges.

whenever you select something from one sizerange, the other sizerange must reset to default!

I would do this with an "onChange" event handler, but...

and here comes problem number two!

the select fields look like this:

Code:
<select name ="id[]">
<option value="" SELECTED>Choose:</option>
<option value="{3}10">58</option>
<option value="{3}11">60</option>
<option value="{3}12">62</option>
<option value="{3}13">64</option>
<option value="{3}14">66</option>
<option value="{3}15">68</option>
<option value="{3}16">70</option>
</select>


as you can see the select field has no special name! all have the name "id[]".
this cannot be changed. i need this name for the shop system which is using this template.

so even if i had a script which would reset the other select field, i would have no possibility to define WHICH is the select field to reset! since all names are equal.

BESIDES: I generate the select fields from a php script! So all ADDITIONAL info beside "name" in the select tag is possible.

i hope i describes this mess in an understandable manner! my mind is a mess... been thinking about this for hours...

greets

Sven

Reply With Quote
  #2  
Old December 7th, 2002, 08:26 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Wrong forum. You want the JAVASCRIPT forum, not the JAVA forum. Happens all the time...
__________________
-james

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > form problem - reset select forms when one is selected...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway