Tengo un formulario para un login en index.php:
Código HTML:
<form id="form1" action="login.php" method="post"> <div class="error" style="display:none;" align="left"> <img src="images/warning.gif" alt="Faltan campos!" width="24" height="24" style="float:left; margin: -5px 10px 0px 0px; " /> <span></span>.<br clear="all"/> </div> <div id="final"></div> <label for="name">Nombre de usuario</label></td> <input id="id" class="required" maxlength="15" name="name" size="20" type="text" tabindex="1" value="" /> <label for="password">Contaseña</label></td> <input id="password" class="required" maxlength="20" name="password" size="20" type="password" tabindex="12" value="" /> <div class="buttonSubmit"> <input type="submit" value="Entrar" style="width: 140px"/><!--onClick="javascript:verificar()"--> </div> </form>
Código HTML:
<script src="Include/validaciones/jquery.js" type="text/javascript"></script> <script src="Include/validaciones/jquery.form.js" type="text/javascript"></script> <script src="Include/validaciones/jquery.validate.js" type="text/javascript"></script> <script type="text/javascript" src="Include/validaciones/jquery.maskedinput.js"></script> <script type="text/javascript" src="Include/validaciones/mktSignup.js"></script> <script src="Include/validaciones/messages_es.js" type="text/javascript"></script> <script> $(document).ready(function(){ $("#form1").ajaxForm({ type: "POST", url: "login.php", data: "name="+$("#name").val()+"&password;="+$("#password").val(), success: function(msg){ $("#final").fadeIn("slow",function(){ $("#final").html(msg); }) } }); }); </script>
No sé mucho de ajax ni jquery, por eso les agradeceria muuucho su ayuda!. Muchas gracias!!!