470,811 Members | 1,144 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,811 developers. It's quick & easy.

POST method

Hi,

How to send a request using post method from browser to web server
using javascript?

Sangeetha
Jul 23 '05 #1
2 1332
You have to have a FORM that you submit.
Now, that FORM could be not displayed by virtue
of all its input elements being type=hidden but you still should
have the FORM. If the FORM doesn't already exist, you can
create it through javascript by starting out with:
var myForm = document.createElement('FORM');
....

Csaba Gabor

"sangeetha" <sa*********@india.com> wrote in message
news:4f**************************@posting.google.c om...
Hi,

How to send a request using post method from browser to web server
using javascript?

Sangeetha

Jul 23 '05 #2
sangeetha wrote:
Hi,

How to send a request using post method from browser to web server
using javascript?

Sangeetha


<body onload="document.forms['myForm'].submit();">
<form name="myForm" method="POST">
<input type="hidden" name="key" value="value">
</form>

Note that some browsers will prompt before actually submitting the
form.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Thomas Scheiderich | last post: by
2 posts views Thread by Keith Selbee | last post: by
24 posts views Thread by moriman | last post: by
56 posts views Thread by UKuser | last post: by
8 posts views Thread by Kurda Yon | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.