bedollandres
Posts: 48
|
| Posted: 11/04/2005, 3:03 PM |
|
I'm using the gofetch example to populate dependent lists, So when I select State1 it populates the cities listbox with the cities of State1.
But say the person is done filling the record form and clicks "insert", a required field wasn't filled so he has to fill it, the selected city still remains but the listbox is populated with all the cities, not only the ones from State1, how can I validate that the City selected belongs to the State1?
Just in case the user changes the selected city by mistake when getting the requiered field missing.
table_states
id_state
txtstate_name
table_cities
id_city
id_state
txtcity_name
_________________
bedollandres |
 |
 |
Edd
Posts: 547
|
| Posted: 11/05/2005, 6:50 PM |
|
In Javascript, you should create an Onload event.
I that event fire extract the value ot the State, if it is populated then fire the function that populates the Citires for that state.
This should hold true if the city field is populated.
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
|