wwfc_barmy_army Posted June 9, 2009 Share Posted June 9, 2009 Hello. I have a database with two tables, car makes and car models. The car makes is setup like this: make_id | make_name 1 ford etc etc car models is setup like this: model_id | make_id | model_name 1 1 mustang etc etc I've got a dropdown box with all the makes in, but when a make is chosen i need it to activate another text box and display the models for that make_id. Any suggestions on how i might do this? thanks. Link to comment https://forums.phpfreaks.com/topic/161486-values-dynamically-into-dropdown/ Share on other sites More sharing options...
scvinodkumar Posted June 9, 2009 Share Posted June 9, 2009 Hi, You can use ajax for this. use onchange to call the ajax function to get the models. for example, <select name="make" onchcange=get_models(this);"> ..... </select> <input type="text" name="model" value=""> function get_model(id) { call ajax function(); } Link to comment https://forums.phpfreaks.com/topic/161486-values-dynamically-into-dropdown/#findComment-852194 Share on other sites More sharing options...
wwfc_barmy_army Posted June 9, 2009 Author Share Posted June 9, 2009 hmm. Ok, i'll give it a go later. Thanks. Link to comment https://forums.phpfreaks.com/topic/161486-values-dynamically-into-dropdown/#findComment-852232 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.