You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bobby oberai <bo...@hotmail.com> on 2002/10/11 05:07:31 UTC

Settiing hidden fields (thru Javascript) & Form Beans

Hello All,

I m having a hidden field which maps to an Action Form Bean Field (I have 
used <html:hidden> tag for this). If I set any values in this html hidden 
field via Javascript, the values are not passed to the Form Bean.

Any help on this?

Thanks,
Bobby

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Settiing hidden fields (thru Javascript) & Form Beans

Posted by Andrew Hill <an...@gridnode.com>.
Strange, a hidden field should work just the same as a normal text field
(except that its invisible).
Few things to check:
0.) Check the generated html to see its what you expect it to be
1.) Do other fields on the form work? (ie: is it just the hidden field got
problem?)
2.) Is the hidden field located somewhere on the form - ie: between <form>
and </form>?
3.) Have you set the property attribute correctly?
4.) Is the setter working for that field - if you make the field visible and
manually enter data does it work then? Is the parameter actually passed
through to the server with the form - (if so its the form bean and not the
client side at fault.)
5.) Is your javascript in fact setting the value for you or is it breaking?
(Can check by again making the hidden field visbible and watching what
happens)

The above should help you narrow down the problem.


-----Original Message-----
From: bobby oberai [mailto:bobby_oberai@hotmail.com]
Sent: Friday, October 11, 2002 11:08
To: struts-user@jakarta.apache.org
Subject: Settiing hidden fields (thru Javascript) & Form Beans


Hello All,

I m having a hidden field which maps to an Action Form Bean Field (I have
used <html:hidden> tag for this). If I set any values in this html hidden
field via Javascript, the values are not passed to the Form Bean.

Any help on this?

Thanks,
Bobby

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>