You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "LUCERO,DENNIS (HP-Boise,ex1)" <de...@hp.com> on 2003/03/14 00:09:15 UTC

javascript problem

 
Hello 
I am trying to do this:
 
<html:button property= "someButton"
onClick="doSomething(<%=somedynamicvariable%>)" > Do Something
</html:button>
 
Basically trying to pass a dynamic variable as arg to java script function
within the struts html:button tag.
 
 
 
I know I can build up the string in scriplet code like this
<%  String temp = "doSomething(" +dynamicvariable + ")"  ;    %>
 And then use this in the button tag
<html:button property= "someButton"  onClick="<%=temp%>" > Do Something
</html:button>
but, I  do not want to use that solution.
 
Any help appreciated.
 
 
We come from the land of the ice and snow
With the midnight sun, where the hot springs glow
The hammer of the gods, will drive our ships to new lands
Fight the horde, Sing and cry
Valhalla I am coming