i have two combox in my page.first is for division and second for gp.when user selecte division corresponding value shoud me fill from mysql in second combox with out submit my form data.any help..
from rohit
Last edited by rohitrohitrohit; Sep 9th, 2008 at 7:44 am.
If I understand correctly ...
1. You want to load the page with the form
2. When someone selects an item in Box A
3. Box B is populated with values based on Box A's selected item
4. And not reload the page or submit the form at this time
You can not do this with PHP alone. You would need to submit the form and thus reload the page in order to just use PHP to do this.
The current standard way to do this is to use JavaScript to ...
1. Detect when a new item has been selected in Box A
2. And then make a JavaScript Asynchronous Http Request (AJAX) to a server-side script (PHP) and receive the results of that request.
3. Once the JavaScript receives the results the JavaScript then updates the values of Box B using ...
3a. innerHTML method, or
3b. DOM methods
Hope this helps, let us know if you need more help with this
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.