Jquery doesn't post for some reason

Posted by Asaf on Stack Overflow See other posts from Stack Overflow or by Asaf
Published on 2010-05-08T16:51:14Z Indexed on 2010/05/08 16:58 UTC
Read the original article Hit count: 209

Filed under:
|

I wrote this small page and for some reason when I cilck on the submit nothing happens (checked on firebug, no submit is happening)

<head>
    <script type="text/javascript" src="jquery-1.4.2.min.js"></script>
    <script type="text/javascript">

        $('form#login').submit(function() {
            $.ajax({
                type: 'POST',
                url: 'http://my.site/login.php',
                data: this.html(data),
                success: success,
                dataType: dataType
            })

        });






    </script>
</head>
<body>
    <form action="#" id="login">
        <input type="textbox" id="UserName" value="user">
        <input type="textbox" id="Password" value="password">
        <input type="submit" value="submit">
    </form>
</body>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about post