Hi all,
I would like to know how to call a JSP function when the user click button.
In JavaScript, I create a functon call AddUser(), the I call the function using OnSubmit.
How do I do this in JSP??
Thanks in advance... :)
Hi all,
I would like to know how to call a JSP function when the user click button.
In JavaScript, I create a functon call AddUser(), the I call the function using OnSubmit.
How do I do this in JSP??
Thanks in advance... :)
Learn the difference between serverside and clientside processing.
The button is clicked in the client, the JSP runs on the server.
You can NOT run a JSP on the client, and you should NEVER put a method in a JSP.
Have the submit of the page call a servlet, which processes the request and sends its results to a JSP which will show the results to the client.
That's how you do it, and no other way.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.