nsuriya239
nsuriya239

Reputation: 89

Can we retrieve values of the input elements without using forms in java?

I was trying to access values in a JSP page.Can I access the values of the Input Elements from servlet which are outside the form ?.

Upvotes: 0

Views: 136

Answers (1)

Emre Acar
Emre Acar

Reputation: 920

You can put hidden input values inside the form, and copy the input elements' values on them with javascript when you need.

Or you can use ajax as they suggested in this question:

Sending text-field value to server without form tag

Upvotes: 1

Related Questions