I m doing a database project using jsp and javascript and back-end using mysql.
In my GUI,there is a page where when i select a particular item in a textbox .the other textboxes should automatically load other values from the database using the value selected from the first textbox.how can i do this using javascript?
I tried using
obj1=this.options[this.selectedIndex].myvalue
But this did not work.
javascript is a client-side scripting language .You should use AJAX for access data from Mysql Server.
javascript is used in
AJAXto connect to databases. So what you need is anAjaxcall to the server, retrieve values from database.Refer : http://www.ajaxmatters.com/2006/05/getting-started-with-ajax-using-java-tutorial/