This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Submitting a Form Using A Link .... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Submitting a Form Using A Link ...." Watch "Submitting a Form Using A Link ...." New topic
Author

Submitting a Form Using A Link ....

Matt Connors
Greenhorn

Joined: Sep 08, 2004
Posts: 23
I would like to know if it is possible, without using javaScript, to submit a form using a hypertext link.

Does Struts provide any support for this?

thanks.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

Matt,
You can submit a form if you know the parameters and their values in advance:

You can't submit an actual form where the values change without using JavaScript.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Itenas
Greenhorn

Joined: Oct 29, 2004
Posts: 3
you can use

<a href="javascript:test()">...</a>

:: Just provide the javascript test() to submit the form.

e.g.
function test()
{
.... // validations or whatever you need to do first

document.forms[0].method="POST";
document.forms[0].submit();
}
 
Have you checked out Aspose?
 
subject: Submitting a Form Using A Link ....
 
It's not a secret anymore!