POST method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sangeetha

    POST method

    Hi,

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

    Sangeetha
  • Csaba Gabor

    #2
    Re: POST method

    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.create Element('FORM') ;
    ....

    Csaba Gabor

    "sangeetha" <sangeetha_b@in dia.com> wrote in message
    news:4fde56d3.0 404291241.6b360 352@posting.goo gle.com...[color=blue]
    > Hi,
    >
    > How to send a request using post method from browser to web server
    > using javascript?
    >
    > Sangeetha[/color]


    Comment

    • Grant Wagner

      #3
      Re: POST method

      sangeetha wrote:
      [color=blue]
      > Hi,
      >
      > How to send a request using post method from browser to web server
      > using javascript?
      >
      > Sangeetha[/color]

      <body onload="documen t.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 <gwagner@agrico reunited.com>

      * Client-side Javascript and Netscape 4 DOM Reference available at:
      *


      * Internet Explorer DOM Reference available at:
      *
      Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


      * 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


      Comment

      Working...