View Full Version : could <A> tag works like post method
ervelu
06-20-2006, 04:08 AM
:confused: The code
<A href=" URL?request-param=value" >
works like the get method in <form> tag. Is there any way to do this as post method? Anybody could plz help me?
Horus_Kol
06-20-2006, 05:15 AM
you can assign a javascript function to the <a> tags' onclick attribute, which can then send a POST request to the server...
I haven't done it myself, but I do know it is possible...
I will move your question to the Client Side section so that the right people see it and can answer.
Kravvitz
06-20-2006, 05:27 AM
Why do you want to use the HTTP POST method?
Horus_Kol
06-20-2006, 07:22 AM
so as not to display information in the URL?
pj_anf
06-20-2006, 10:50 AM
i just use:
<a href="javascript:document.forms[0].submit();">SUBMIT</a>
works great for me.
Kravvitz
06-20-2006, 07:02 PM
Keep in mind that some Internet users use a browser that doesn't have JavaScript enabled. (http://www.thecounter.com/stats/2006/May/javas.php)
The Importance of Degrading Gracefully (http://weblog.burningbird.net/archives/2005/03/25/the-importance-of-degrading-gracefully/)
Perpetuating the myths of JavaScript degradation. (http://domscripting.com/blog/display.php/25)
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.