|
-
Oct 29th, 2006, 03:54 PM
#1
Thread Starter
WiggleWiggle
POST in a link
Is there a way that i can do a POST (like in forms) through a URL?
My usual boring signature: Something
-
Oct 29th, 2006, 04:40 PM
#2
Re: POST in a link
nope. that's what GET is used for.
-
Oct 29th, 2006, 04:53 PM
#3
Thread Starter
WiggleWiggle
Re: POST in a link
didnt think so. how about submiting a form from a link?
My usual boring signature: Something
-
Oct 29th, 2006, 11:53 PM
#4
Re: POST in a link
no. you can't do that. that's what GET is for.
it might be possible to submit something automatically using JavaScript, but I somehow doubt it, because it would be a huge security risk if you think about it.
-
Oct 30th, 2006, 12:45 AM
#5
Re: POST in a link
Huh? It's no more of a security risk than submitting a form manually...
You can either make a POST request with manual payload using XMLHttpRequest; or (easier) you can just call the submit() method of a form element on the page. I do this in one Javascript application to save form variables when switching pages; it works without a hitch.
Anchor links point to another resource, not an action: that's why they are effected using GET requests.
-
Oct 30th, 2006, 05:07 AM
#6
Re: POST in a link
You can also style a button|type="submit" to look like a link. I do this for logout links sometimes, because logout is a state-changing action and should thus be a POST request, yet style issues prohibit using an ugly button for that. And I have no graphical skills whatsoever.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|