Well ,
I have a page with a submit button. When Clicking on the submit button , the page is transfered to the next page(i.e servlet page). But i want that the form page contents (i.e all the attributes and the values )should be transfered to the servlet page and not the entire page (i.e it should be on the form page after clicking on submit button).
This is for mobile using jQuery Mobile framework
I think it requires some javascript coding.
Thanks and regards,
Vineet M
There’s two approaches you could take here.
The first is pretty quick and dirty: you submit the form to the servlet page, which receives the form values, and you then immediately bounce the user back to the form.
The second way, proper, way, is AJAX. Using javascript to compose an HTTP request which you fire off and which completes in the background, without the user seeing anything further. Here’s a good introduction.
Use this with caution, though – you’ll need to pay attention to your user interface, to let the user know what is going on (or what’s going wrong) at each stage in the process. It’s a powerful tool, and with power comes responsibility. 😉