#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    31
    Rep Power
    13

    Submiting form with javascript function....


    I have a shopping cart.
    It containes a form with all the items and costomer info.
    Within the form I have another form to delete specified items with. But when I push the submit button in the delete form, I send the other form.(hope this makes any sense)

    What I need is a way to send the delete form.
    If I use a ordinary button in the delete form, and not a submit button. Then I can make it call on a javascript functin that sends the delete form.

    Does anyone know how to make javascript send a form????
  2. #2
  3. An Ominous Coward
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2002
    Posts
    4,425
    Rep Power
    0
    Well, the answer to your question is that you use the form's submit() method to submit a form as in:
    PHP Code:
    <input type="button" onClick="document.form.submit();"
    If this doesn't answer the question, post some code please!

IMN logo majestic logo threadwatch logo seochat tools logo