question in AJAX

Discussion in 'PHP' started by itayauerbach, Apr 22, 2010.

  1. #1
    I've got a shopping cart page,

    and I want to add inside the cart form (in which you can remove items, edit quantitiy or check out) a field where one can enter a state and zip code and by that a shipping cost line is added in a table that prints the total price, near the end of the form.

    I understood that you cannot do form inside a form, and perhaps needs to do it in ajax... can somebody guide me how to do it?

    thanks,
    -Itay
     
    itayauerbach, Apr 22, 2010 IP
  2. itayauerbach

    itayauerbach Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    here is the page:

    www. vitawealth .com/cart/cart.php?addproduct=57&site=vw


    it currently features that shipping calculator beneath the form.
    i want to insert it above the outcome price report, inside the form.
    but it doesn't work, because that will be form inside form. this is why i thought about ajax, thou I have no idea how to manifest it.
     
    itayauerbach, Apr 22, 2010 IP
  3. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #3
    You would use ajax to get the data that is input, then use load with either the values in the url or posted to that file, you would then have it output the result to a specified container.
     
    Silver89, Apr 22, 2010 IP