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. Quote Link to comment 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(); } Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.