struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kawczynski, David" <david_kawczyn...@merck.com>
Subject RE: html:link submit with request parameters
Date Fri, 13 Nov 2009 19:44:55 GMT
Use javascript to get a reference to the form, and call its submit 
method.  

EG
<form name="form" id="form" action="/setup.do">
    <input name="blah" />
    <input type="submit"/>
</form>
<script>
function submit() {
    document.getElementById("form").submit() return false;
}
</script>
<a href="javascript:submit();" 
   onclick="return submit();">click me</a>






> -----Original Message-----
> From: fea jabi [mailto:zyxrm@hotmail.com] 
> Sent: Thursday, November 12, 2009 8:43 PM
> To: user@struts.apache.org
> Subject: html:link submit with request parameters
> 
> 
> I need to submit the form when the <html:link ..... > is 
> clicked/pressed and also need to pass parameters. 
> 
>  
> 
> <c:url value="/setup.do" var="setupUrl">
> 
> <c:param name="empId" value="${custItr.empId}"/>
> 
> </c:url>
> 
> <html:link href="<%= 
> (String)pageContext.getAttribute(\"setupUrl\") %>" 
> transaction="true" >
> 
> <c:out value="${custItr.empName}"/>
> 
> </html:link>
> 
>  
> 
> but this is not submitting the form. How can I submit the 
> form and also pass the request params? Basically I want other 
> values entered in the html form are set to the form bean so i 
> can acess those in action class when the link is pressed.
> 
>  
> 
> How can this be done?
> 
>  
> 
> Thanks.
>  		 	   		  
> _________________________________________________________________
> Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/177141664/direct/01/
> http://clk.atdmt.com/GBL/go/177141664/direct/01/
> 
Notice:  This e-mail message, together with any attachments, contains information of Merck
& Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates
Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html)
that may be confidential, proprietary copyrighted and/or legally privileged. It is intended
solely for the use of the individual or entity named on this message. If you are not the intended
recipient, and have received this message in error, please notify us immediately by reply
e-mail and then delete it from your system.


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


Mime
View raw message