Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to pass a bean(struts) through javascript.???

 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I have an issue where im expected to pass the value required for a javascript function using the value obtained from a form bean . I would like to know whether its possible to do so .
I'm looking at something on these lines (or the equivalent) in my JSP
.

And the corresponding Javascript function as :



Please help on how i could pass the bean value to the Javascript
Thanks.
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


implies that you are submiting a form used in your JSP

anyways, the below code should work fine as is... what is the problem that you facing?

<td><html:button property="objid"
onclick="alert('<bean:write name="listDetails" property="objid"/>')" value="Edit" > </html:button></td>

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic