struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sniadach, Tomasz" <Sniad...@makdata.de>
Subject AW: html:button and Javascript
Date Fri, 13 Feb 2004 09:01:00 GMT
Yes it is realy simple , but it works :)			
Thanks a lot 
Tomek

-----Urspr√ľngliche Nachricht-----
Von: Rahul Mohan [mailto:rahul_mohan@pune.tcs.co.in] 
Gesendet: Freitag, 13. Februar 2004 07:37
An: Struts Users Mailing List
Betreff: Re: html:button and Javascript



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" <Sniadach@makdata.de>
To: <struts-user@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


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message