struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LouD0...@aol.com
Subject Html:button tag problem
Date Thu, 27 Mar 2003 22:23:39 GMT
Hello,

I am converting an app to Struts. 

In the original JSP page, I had
<% ...
String reportName = (String) session.getAttribute(Parameter.REPORT_NAME);
...
%>
...
<BODY
...
<input type="button" name="showReport" value="Submit"
    onclick="performSubmit('<%=reportName'%>','SUBMIT_BUTTON')">

In the new code, the <input> tag is now:
<html:button property="showReport" value="Submit"
    onclick="performSubmit('<%=reportName%>','SUBMIT_BUTTON')">

However, when I run this, the <%=reportName%> does not resolve to it's value. 
When I View Source (using Netscape), I see the ">','SUBMIT_BUTTON')" part of 
the onclick blinking.

I also tried 
<c:set var="onclick" scope="page">
  performSubmit( '<%=reportName%>', 'SUBMIT_BUTTON')
</c:set>

<html:button property="showReport" value="Submit" onclick="${onclick}"/>
but it didn't resolve ${onclick} .

Any ideas would be greatly appreciated.

Thanks.




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message