and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Here is a multiple choice select form field. Let us say the user clicks on the state even though it's disabled.
It would make sense to have JavaScript highlight the associated regions of that state all at once when the user clicked on the state with say an onclick or onmousedown event trigger.
[syntax="html"] <select class="state" name="" multiple="multiple">
<option class="state" disabled="disabled" value="state">State 1</option>
<option class="region" value="#">Region</option>
<option class="region" value="#">Region</option>
<option class="region" selected="selected" value="#">Region</option>
<option class="region" value="#">Region</option>
<option class="region" value="#">Region</option>
<option class="region" value="#">Region</option>
<option class="state" disabled="disabled" value="state">State 2</option>
<option class="region" value="#">Region</option>
<option class="region" value="#">Region</option>
<option class="region" selected="selected" value="#">Region</option>
<option class="region" value="#">Region</option>
<option class="region" value="#">Region</option>
<option class="region" value="#">Region</option>
</select>
With IDs needing to be unique I'm not sure how you would dynamically doing this without creating some sort of list for all the regions associated with each state. Kick ass idea though.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
On the Tools menu, click Internet Options.
Select the Security tab, and click the icon for the zone containing Internet, then click Custom Level
Scroll down to Scripting and under Active Scripting, select Enable.
Click OK. Click Yes to any popup asking if you want to change the security settings, then click OK. Now retry.
bravobritto wrote:On the Tools menu, click Internet Options.
Select the Security tab, and click the icon for the zone containing Internet, then click Custom Level
Scroll down to Scripting and under Active Scripting, select Enable.
Click OK. Click Yes to any popup asking if you want to change the security settings, then click OK. Now retry.
Regards
Britto
Does this have anything to do with highlighting a region based on a select list selection?
JAB Creations wrote:With IDs needing to be unique I'm not sure how you would dynamically doing this without creating some sort of list for all the regions associated with each state.
How would the regions get populated into the form? I am guessing through some sort of a loop, so you could use a counter and increment that as your ID.
Everah, really I wouldn't mind creating unique ID's and manually setting them to be selected in some sort of loop. Unless someone could go the extra level to take that static idea and make it dynamic. I will have to use ID's, I know that for certain.