JSP select list dynamically fills textbox

Hi, I’m a newbie here and would really really appreciate some help. Its 5.30am and I’ve been all night searching for a way how to populate a textbox from a select list. Basically this is a school thesis and I am working with JSP and I have a database(MySQL) with a table clients. All I want is that when the user selects the client’s name the Address and city are picked up from the database and placed in the relative textboxes. So far I have managed to create a dynamic select list which shows the people in the DB but I haven’t managed to create the Postback/Javascript to update the textboxes accordingly. If this is remotely possible I would be so grateful for any help! :slight_smile:

Typically the PHP side converts the data into a string of JSON data, which can then be received by the client and easily processed.

Hi Thanks for your reply. I was trying to do something (still unsuccessful) with JavaScript and AJAX … I have created a getClient.jsp and tried to adapt some javascript / AJAX code on the page addInvoice.jsp I found on the net to link to it when an onchange event from the select list is fired … for some odd reason tho the onchange statement is not going to the javascript function and I’m finding it hard to debug since the page is already rendered!

If it’s of any help, we’ll most likely have the same trouble due to your working in jsp, which is Java, something completely different from JavaScript. We do have a Java and JSP forum though, where you are more likely to receive a viable solution for your situation.

Thank you some much Paul for your time :slight_smile: Your effort was much appreciated. I will check it out then and see if they can guide me out of my dark forest hehe :slight_smile: