submit button

Discussion in 'Javascript' started by jim whitaker, Sep 27, 2006.

  1. jim whitaker

    jim whitaker Guest

    I followed this tutorial, and I have it working.
    http://www.webpasties.com/xmlHttpRequest/
    My question is this:
    After an AJAX form receives it's data from the server, how could i then
    submit (post) that data to another php file?
    IN other words, An order entry system where the ajax fills the form with
    shipping address. Then there are a few other fields to fill out, then I
    want to hit a submit button that post to uptate.php.
    When I try this there are errors. Its as though only the original ajax
    request will work. To me this is the whole idea of ajax, to auto fill some
    form fields. But, what good is it if you can't post to somewhere the data
    you retrived. Surely an order system needs to post data to the orders
    table.
    Please help, I've been at this for a week. Below is the modified html
    portion of the form.
    I added the submit button. Only testing at this point, no real application
    yet. I have a php version, but you know all the pages involved. That's why
    I'm trying to move some forms to ajax / javascript. I am new at the ajax
    thing.

    <form method="POST action="http://localhost/basic/ptest/update.php">
    <p>

    ZIP code:

    <input type="text" size="5" name="zip" id="zip"
    onblur="updateCityState();" />

    </p>

    City:

    <input type="text" name="city" id="city" />

    State:

    <input type="text" size="2" name="state" id="state" />

    <p><input type="submit" value="Submit" name="B1"></p>


    </form>
     
    jim whitaker, Sep 27, 2006
    #1
    1. Advertising

  2. jim whitaker

    Ian Collins Guest

    jim whitaker wrote:
    > I followed this tutorial, and I have it working.
    > http://www.webpasties.com/xmlHttpRequest/
    > My question is this:
    > After an AJAX form receives it's data from the server, how could i then
    > submit (post) that data to another php file?
    > IN other words, An order entry system where the ajax fills the form with
    > shipping address. Then there are a few other fields to fill out, then I
    > want to hit a submit button that post to uptate.php.
    > When I try this there are errors. Its as though only the original ajax
    > request will work. To me this is the whole idea of ajax, to auto fill some
    > form fields. But, what good is it if you can't post to somewhere the data
    > you retrived. Surely an order system needs to post data to the orders
    > table.


    What errors? What do you expect to happen and what do you see?

    --
    Ian Collins.
     
    Ian Collins, Sep 27, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    1
    Views:
    1,738
  2. Ghafran Abbas
    Replies:
    0
    Views:
    4,260
    Ghafran Abbas
    Oct 12, 2004
  3. Replies:
    2
    Views:
    6,295
  4. Network-Man
    Replies:
    5
    Views:
    78,808
    gaul1
    Jul 7, 2012
  5. Guest
    Replies:
    2
    Views:
    1,630
    Guest
    Oct 25, 2004
Loading...

Share This Page