This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes make a POST request upon hyperlink click? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "make a POST request upon hyperlink click?" Watch "make a POST request upon hyperlink click?" New topic
Author

make a POST request upon hyperlink click?

anarkali perera
Ranch Hand

Joined: Sep 10, 2009
Posts: 237
is there any way to make a POST request when a user clicks the hyperlink in some HTML page?
Muthukrishnan Manoharan
Ranch Hand

Joined: Aug 27, 2008
Posts: 91

Did you try for the onclick even of the hyperlink..
anarkali perera
Ranch Hand

Joined: Sep 10, 2009
Posts: 237
I need POST request.
Muthukrishnan Manoharan
Ranch Hand

Joined: Aug 27, 2008
Posts: 91

As far as my understanding, it all depends on the method you give in form tag..
So when you use onclick="document.someForm.submit();" for a hyperlink, it will submit the form using the method specified in the form tag..
anarkali perera
Ranch Hand

Joined: Sep 10, 2009
Posts: 237
can you give me a example?
Muthukrishnan Manoharan
Ranch Hand

Joined: Aug 27, 2008
Posts: 91

Here is an example





 
 
subject: make a POST request upon hyperlink click?