Enabling & disabling the Submit button

Discussion in 'JavaScript' started by enchance, Sep 26, 2007.

  1. #1
    What code is used to enable/disable the submit button in a form?
     
    enchance, Sep 26, 2007 IP
  2. tripy

    tripy Guest

    Messages:
    32
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    document.getElementById('yourButtonId').disabled=true
    
    Code (markup):
     
    tripy, Sep 26, 2007 IP
  3. enchance

    enchance Peon

    Messages:
    109
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    So that's what it was! I kept on typing "enabled = false" instead of "disabled=true". No wonder...
     
    enchance, Sep 26, 2007 IP
  4. adrevol

    adrevol Active Member

    Messages:
    124
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #4
    thats ok , lets try this

    I have a Button onclick of that i am disabling the button and doing a ajax request , after that ajax request i am enabling the button again ...

    Now problem starts , when i press the same button my onclick event is not firing ....Why and How ??
     
    adrevol, Sep 27, 2007 IP
  5. ziogas

    ziogas Peon

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    try form event "onsubmit" maybe
     
    ziogas, Sep 30, 2007 IP