[thelist] Dynamically changing webcontent with the <select> and <option> tag

Eveline e.vanhemel at pandora.be
Tue Sep 30 12:53:18 CDT 2003


Hi guys,

I have the following problem:

I have to create a form with a country select box and by selecting each country another field (region) in the form has to change. Two countries have to supply another select box with regions in it, all the other country selections must result in a simple input textfield for region. This is how I thought to do this. Put the region selectbox for country 1 in a layer, put the region selectbox for country 2 in another layer and put the region inputfield for all the other countries also in another layer. Then I made an onLoad event to select the first country and set the visibility of Layer 1 to visible, the other layers to hidden, up to this point it works well. The problem comes when I am changing the countries in the select box. I tried all kinds of event handlers but none of them does the trick. I tried onChange on the <select> tag (doesn't work, only two possibilities), further on I tried onClick and onSelect events on each of the options, but nothing works.

Am I doing something extremely stupid to try it this way, is there another workaround for this? I am very grateful for every solution and for what it is worth, the forms will be handled by php scripts.

Thank you in advance.

Eveline


More information about the thelist mailing list