mfkamande Posted March 3, 2010 Share Posted March 3, 2010 I am new to Web development. Am using PHP and My SQL Database. I am developing a transport management system. To manage users for the system, I have a combobox (select) which lists the user codes. I have a text box input which I want to display the name (other details from the database) every time the selection changes before submitting the form. How do I achieve this? [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
yozyk Posted March 3, 2010 Share Posted March 3, 2010 You need to use javascipt . Quote Link to comment Share on other sites More sharing options...
prashanth Posted March 11, 2010 Share Posted March 11, 2010 Hi we can achieve this by using AJAX. Here is the flow ---------------------- when you change the option in the select box call the javascript function. you need to build the javascript function which will request to the php file. php file should take the id and perform the database operations and echo the name. in javascript you will get the response and that response you can assign to the textbox. you try in this way and just search in the net you will get lot of scripts. still if you are not clear how to do let me know with your requirements,i will give the code to you. Quote Link to comment Share on other sites More sharing options...
prashanth Posted March 15, 2010 Share Posted March 15, 2010 Hello See the below link http://roshanbh.com.np/2008/09/change-textbox-value-dropdown-list-ajax-php.html 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.