my form is not submitted

Discussion in 'PHP' started by dineshsingh1984, Mar 26, 2012.

  1. #1
    <input type="submit" name="send" id="send" class="small_button" value="Login" onClick="if(validate())
    {
    this.disabled=true;
    this.value='Sending, please wait...';
    this.form.submit();
    return true;

    }
    else
    {
    return false;
    }">

    I'm using this script but when validate function retrun true then my login button is not working

    please tell me where the prob

    please help me.....
     
    dineshsingh1984, Mar 26, 2012 IP
  2. Alex Roxon

    Alex Roxon Active Member

    Messages:
    424
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    80
    #2
    Surely embedding JS like that can't be W3C valid? I'm on a tablet so not I can't really check it out. Either way, try putting that JS code in a function and just use:

    onclick="return yourFunction()"
    PHP:
    If that doesn't work you've just got a problem with the JS (provided you initialized the form properly).
     
    Alex Roxon, Mar 26, 2012 IP