Originally posted by Hirak Dasgupta: On based of input from user I want to populate a table from database in the same jsp form without submitting that form.
So, only AJAX can solve this problem or there is some solution other than AJAX?
If AJAX is the only solution then pls provide me the steps for doing that through AJAX.
Yes, AJAX is the best way to do that. Also, as you don't wan't to submit the page so AJAX is the only solution.
For using AJAX the following steps have to be followed: 1. The section of the jsp that you want to replace with AJAX must be embedded in a span tag. 2. call the retrieveURL method on click of required button in following format retrieveURL(yourAction.do?ask=COMMAND_NAME_1',"yourFormBean"); 3. This function will automatically pass control to your Action class (if using Struts and get the required new values)
A sample ajax file is as below :
[ March 03, 2008: Message edited by: Anubhav Anand ]