Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
HTML Pages with CSS and JavaScript
make a POST request upon hyperlink click?
anarkali perera
Ranch Hand
Posts: 237
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
is there any way to make a POST request when a user clicks the hyperlink in some HTML page?
Muthukrishnan Manoharan
Ranch Hand
Posts: 91
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Did you try
Form.submit()
for the onclick even of the hyperlink..
anarkali perera
Ranch Hand
Posts: 237
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I need POST request.
Muthukrishnan Manoharan
Ranch Hand
Posts: 91
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 237
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
can you give me a example?
Muthukrishnan Manoharan
Ranch Hand
Posts: 91
I like...
posted 12 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
Here is an example
<form action="next.jsp" method="POST" name="someForm"> <input type="text" name="t1" id="t1"> <input type="text" name="t2" id="t2"> < a href="#" onclick="document.someForm.submit();">Submit</a> </form>
A "dutch baby" is not a baby. But this tiny ad is baby sized:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
hyperlink html opening as save as instead of opening in IE
doubts on service, post, get metods?
Preventing anchor tag submit
Implementing the Post Request while htting the hyperlink
Converting a Get Request into Post Request
More...