Hi There,
I am creating a survey that asks users what countries they have worked in, and which regions in those countries. Because there can be many answers, I was thinking I could populate a multiple select box, using php and mysql, containing the countries. When the user selects a country, another select box containing the regions in that country would appear (using Javascript onchange event handler).
My problem is that since multiple countries can be selected, multiple secondary select boxes must be created for several onchange events. I am thinking that I should use another event handler for this one, maybe onclick. Or I should just scratch my idea of creating boxes dynamically and use JS to validate that the region selected is in a country that has also been selected?
Any ideas?
I am creating a survey that asks users what countries they have worked in, and which regions in those countries. Because there can be many answers, I was thinking I could populate a multiple select box, using php and mysql, containing the countries. When the user selects a country, another select box containing the regions in that country would appear (using Javascript onchange event handler).
My problem is that since multiple countries can be selected, multiple secondary select boxes must be created for several onchange events. I am thinking that I should use another event handler for this one, maybe onclick. Or I should just scratch my idea of creating boxes dynamically and use JS to validate that the region selected is in a country that has also been selected?
Any ideas?
Comment