December 3rd, 2002, 06:42 PM
form problem - reset select forms when one is selected...
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.
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:
as you can see the select field has no special name! all have the name "id".
<select name ="id">
<option value="" SELECTED>Choose:</option>
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...
December 7th, 2002, 08:26 PM