You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sniadach, Tomasz" <Sn...@makdata.de> on 2004/02/12 16:41:10 UTC
html:button and Javascript
Hello ,
i have a problem with the html:button tag.
i have a string in my JSP, this is an action, now i have to use a button
to link to the action.
I tryed:
<html:button property="send" onclick="location.href='<%=mystring%>' "/>
but it does not work.
What is wrong ?
Thanks for help
Tomek
Re: html:button and Javascript
Posted by Rahul Mohan <ra...@pune.tcs.co.in>.
u cant nest tags like this....
try this:
<% String onClickString = "location.href" + myString; %>
<html: button
property="send"
onclick="<%=onClickString>" />
another way u can do this is by using html_rt tags:
<html_rt: button
property="send"
onclick="<%='location.href'+mystring%>"/>
i am not sure abt the second one especially the quotes...u can give it try
----- Original Message -----
From: "Sniadach, Tomasz" <Sn...@makdata.de>
To: <st...@jakarta.apache.org>
Sent: Thursday, February 12, 2004 9:11 PM
Subject: html:button and Javascript
Hello ,
i have a problem with the html:button tag.
i have a string in my JSP, this is an action, now i have to use a button
to link to the action.
I tryed:
<html:button property="send" onclick="location.href='<%=mystring%>' "/>
but it does not work.
What is wrong ?
Thanks for help
Tomek
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org