Is that possible?
1. I have 2 dropdown lists where a user can choose models for a photo shooting. In a third dropdown list the user can select how many photo sets should be produced. If the user seletcs only one model there should be 1-4 shootings available, if he selects two models there should be only 1-3 shootings available.
2. We also have couples which appear as "one" model. If a user selects a couple he should not be able to select another model from the second dropdown list. The other way around would be also a possibility. I start with one dropdown and if the user selects a "single" model the second dropdown should appear.
Is that possible? If yes, could you give me an idea how to do this?
Thanks fro your support,
With all the shooting and lack of coffee, I'm somewhat slow this morning. However, I think you're asking if selection lists can be dynamically created. If so, the answer is YES! See the various scripts/tutorials at my site (GrassBlade)
Once you get some code up, let me/us see it.
I've had a look at your site, but I am not sure if that will solve my problem.
The dropdowns I use are always identical filled with a various amount of models which the user selects on a previous page.
Now there are three types of models. Male, female or couples. If the user selects either a male or female in one of the dropdowns he should be able to select a second male or female. If he/she seletcs a couple no second pick should be possible.
To bring it to the point, no matter what it should not be possible to choose more than two human beings ;)
If it's still not clear drop me a note.
Thanks and best regards,
From what I can make out, the Cascading Selects scripts/tutorials should work with some changes.
The first select can be a simple one -- 3 options:male/female/couples
based on that selection create a 2nd selection list
if the selection is a couple, no third select, go straight to shooting select
if the selection is male, the 3rd select contains only females, then go to shooting select.
if the selection is female, inverse of above
Final select: create a global var that holds the type of model(s) selected, based on that create your shooting select.
As I said before, put up some code
I have not forgotten about this post. We have to decide first internally how we handle this issue.
I believe it's still not clear what I try to do and it is certainly worth posting some code. I will do so as soon as I now what exactly needs to be established.
Thanks for your input so far and stay tuned ;)
we have decided to let PHP take most of the action and most of the scipt works fine.
Except one "little" issue.
We display different boxes for single models (male & female) and couples. For couples we only display one dropdown list. We have the following code involved...
gvalue1[i] = p.elements['actor1_'+i].options[p.elements['actor1_'+i].selectedIndex].value;
gvalue2[i] = p.elements['actor2_'+i].options[p.elements['actor2_'+i].selectedIndex].value;
Is there a way like if doesn't exist do not try to get value?
Hope you know what I mean.
Thanks and regards,
Not sure, but...I'm presuming you are running the 2 lines regardless of the actual existence of the selection box.
You could put the code within a conditional. Not having all pertinent code to look at, I can only generalize.
if (p.elements.name == 'actor2_' + i)