when you override submit with js , you have to return false, or it
gets submitted the old fashioned way!


On 10/8/06, TJ <[EMAIL PROTECTED]> wrote:
>
> I added the login, sorry about that
> When I execute I get the vars in the address bar
> http://www.tjshafer.com/baintown/main.php?user=test&pass=test&sublogin=1
>
> <script type="text/javascript" language="JavaScript">
> $(document).ready(function(){
>         $('form').submit(function(){
>                 $.ajax({
>                                 url: "process.php",
>                         type: "POST",
>                         data: $.param( $("#login").formdata()),
>                                 success: function(msg){ alert( "Data Saved: " 
> + msg ); } });
>                         });
>                  });
>       });
>   </script>
> <form id="login">
> Username:<input type="text" name="user" maxlength="30">
> <br/> Password:<input type="password" name="pass" maxlength="30">
> <input type="checkbox" name="remember">
> <!--<font size="2">Remember me next time &nbsp;&nbsp;&nbsp;&nbsp;-->
> <input type="hidden" name="sublogin" value="1">
> <input type="submit" value="Login">
> <!--<br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font>
> <br>Not registered? <a href="register.php">Sign-Up!</a>-->
> </form>
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to