Another option is to use a submit button (that will post the form) and CSS to make it look as a link :
<html> <head> <style type="text/css"> .submit { border:0px; background-color:#fff; cursor: pointer; text-decoration:underline; } </style> </head> <body> <form> <input class="submit" type="submit" name="bouton" value="valider"/> </form> </body> </html>
Nico
Jeff Beal a écrit :
You need to have the link fire off a JavaScript function that will submit the form. I don't think you'll want to use the <html:link/> tag in this case, since you won't need to do anything fancy with a request URI.
Here's a really quick example that will run in Internet Explorer. I haven't done enough JavaScript in other browsers to make any guarantees with those, but modifications to this shouldn't be all that difficult:
<a href="#" onclick="document.forms.namedItem('FORMNAME')">Submit</a>
For FORMNAME, you need to use the name attribute of the FORM element. IIRC, Struts uses the name of the Form Bean here. The easiest way to be sure is to run your app and view the generated source, though.
-- Jeff
Flávio Maldonado wrote:
Hello...
How can I do to make a <html:link> works like a <html:submit> ?? For example...
I have this button: <html:submit property="method"> <bean:message key="user.newUser.displayname"/> </html:submit>
and I'd like to make a Link to do the same thing.
thanks for help!
Flávio Vilasboas Maldonado Diretor de Desenvolvimento SedNet Soluções (35)3471-9381
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]