faqts : Computers : Programming : Languages : JavaScript : Forms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

69 of 122 people (57%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How can I send a HTTP POST request to a server?

Mar 2nd, 2000 15:59
Martin Honnen,


You need to use a FORM in your page with
  <FORM NAME="formName"
        METHOD="post"
        ACTION="yourFormProcessor"
  >
  <!-- some form elements here hidden or visible -->
and then submit the form with javascript:
  document.formName.submit();
The construction of a request body is not otherwise possible with 
client side JavaScript.