| Author |
Assigning values to hidden variables
|
Varshini Priya
Ranch Hand
Joined: Feb 17, 2008
Posts: 61
|
|
Hi
Can you please let me know how do I pass the value of one field(i.e the input value entered by user for a particular field ) as the value for a hidden field in jsp.
THanks in advance
|
 |
Neeraj Dhiman
Ranch Hand
Joined: Dec 19, 2011
Posts: 61
|
|
|
I used a java script function for this. Correct me if i am doing this in wrong way.
|
Correct Me if i am wrong
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50691
|
|
JavaScript is not necessary. Simply use an EL expression (with <c:out> if encoding is needed) to emit the value as the value attribute of the hidden element.
E.g.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Neeraj Dhiman
Ranch Hand
Joined: Dec 19, 2011
Posts: 61
|
|
|
yes this is the better one. thanks Bibeault.
|
 |
 |
|
|
subject: Assigning values to hidden variables
|
|
|