Forum Moderators: open

Message Too Old, No Replies

How to access the value portion of a HTML hidden field

         

Balamurali

3:12 pm on Jun 14, 2007 (gmt 0)

10+ Year Member



I need to access the value of the HTML hidden field in a JSP file. I can be able to set some value for the hidden field but I donno how to access the value which I have set into the hidden field in the same JSP to set the value for some other field. [I am doing these complex logic, due to some restriction of Struts tags.]

For example,
.
.
.
<input type="hidden" value="test"> // populated inside an iterator
.
.

I need to access this dynamic value and set this for some other struts tag.

for example,
<bean:write id="a" value="test1">

I have tried using pageContext.getAttribute() also. But still I can't get any solution.

If any one can help me out, I would be really thankful to them.

Thanks inadvance :o)

Fotiman

3:16 pm on Jun 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You need to give your hidden input a name attribute:

<input type="hidden" name="test1" value="test">