• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pass a parameter to an event handler

 
Steve Watson
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to pass a bean property value to a JavaScript function through an onclick event handler. The following code works fine (of course on click without a space) with a hard coded value of 1 passed to the function:



But how do I pass the bean parameter which I can get from:



Thanks any help.

[ January 14, 2006: Message edited by: Steve Watson ]
[ January 14, 2006: Message edited by: Steve Watson ]
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing this off the top of my head, but something close to the following should work since a page scope attribute named with the id attribute is created by the <logic:iterate> tag:



If you wanted to make your code a little neater, you might try using the <bean:define> tag:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic