Hi,
I am trying to figure out how to show or hide a selection of divs on my page depending on what is selected from a list/menu item, using css & javascript.
I have tried to use the script listed here:
http://www.thescripts.com/forum/thread88791.html
but have been uable to customise it to my needs and could do with some help.
My form is asking people how many tickets they would like to an event & depending on their selection I need that number of divs (containing 3 feilds - guest name, company, email) to be displayed.
So far I have a list/menu with numbers from 1-20 as the values.
I then have a series of divs with ids of guest1 to guest20 all set to style="display:none"
When a number is selected from the list/menu I need that number of fields to be displayed so for example if someone selects 3 from the list/menu I will need guest1, guest2 and guest3 to change to style="display:block"
Can anyone help me out with the javascript?
Thanks!