submit element

Discussion in 'JavaScript' started by speeeee, Nov 6, 2007.

  1. #1
    Hi! Is it possible to submit just one element in a form (not the whole form)?
    Something like document.form.getElementById('id').Submit();

    Spee
     
    speeeee, Nov 6, 2007 IP
  2. cjburkha

    cjburkha Peon

    Messages:
    71
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    No, only a form can be submitted, an element cannot.

    You can have multiple forms, and submit one of them.

    document.forms[1].submit()
     
    cjburkha, Nov 6, 2007 IP