dutcbhboy83 Posted August 11, 2008 Share Posted August 11, 2008 I have a double drop down box, where the choice of the first box forces the page to reload and place different data in the second box. Kind of like having a country dropdown and state/province dropdown so depending on the country you pick you get a different list of states or provinces. This works great. But the problem is that I also have a form on this page and if you start filling out the form and then change the drop downs all the data that you have already filled in goes blank, because the page refreshes so it only makes sense. Does anyone have any suggestion to how I can get around this happening and reload all the variables that have already been filled in. Thanks for you help in advance Quote Link to comment https://forums.phpfreaks.com/topic/119133-dynamic-changes-to-a-page/ Share on other sites More sharing options...
DarkWater Posted August 11, 2008 Share Posted August 11, 2008 What does this have to do with OOP? >_> And you can either check out Ajax, or just echo out the existing form values in the value attribute of the input tag. Quote Link to comment https://forums.phpfreaks.com/topic/119133-dynamic-changes-to-a-page/#findComment-613425 Share on other sites More sharing options...
ignace Posted August 11, 2008 Share Posted August 11, 2008 use ajax, that way only a specific place on your website gets refreshed, without touching any other data http://www.ajax-tutorials.com/tutorial-list/resource/AJAX_Dynamic_Drop_Down_List_PHP_xajax/ Quote Link to comment https://forums.phpfreaks.com/topic/119133-dynamic-changes-to-a-page/#findComment-613457 Share on other sites More sharing options...
dutcbhboy83 Posted August 11, 2008 Author Share Posted August 11, 2008 thanks ignace , I checked out the tutorial from ajax, interesting, but I can't seem to figure out how to make it work with an sql query instead of a hard coded list. If you know anything else about this it would be a big help. Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/119133-dynamic-changes-to-a-page/#findComment-613773 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.