Hola amigos tengo el siguente script que me funciona en IE preo en chrome no funciona
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language="javascript" type="text/javascript" src="../js/jquery.js"></script> <link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'> body{
font-family: 'Open Sans Condensed', sans-serif;
}
$(document).ready(function(){
$('#local').focus();
$("#formulario").submit(function(){
var cadena = $(this).serialize();
var url ='procesa.php';
alert('Datos serializados: '+cadena);
$.ajax({
type: "POST",
url: url,
data: cadena,
success: function(data){
alert(data);
},
error: function(objeto, quepaso, otroobj){
alert("Error Pasó lo siguiente: "+quepaso);
}
});
});
});
<form id="formulario" method="post"><br /><br /> <table width="406" border="0" align="center" cellpadding="0" cellspacing="0" style="border:solid 1px #CCC;box-shadow: 8px 8px 15px 1px rgba(173,173,173,0.5);"> <td width="37"> </td> <td width="109"> </td> <td width="258"> </td> <td height="30"> </td> <td><?php echo date('d/m/Y')?></td> <td height="30"> </td> <td><input type="text" id="local" name="local" required/><span id="res_local"></span></td> <td height="30"> </td> <td><input type="text" id="documento" name="documento" required/><span id="res_doc"></span></td> <td height="30"> </td> <td><input type="text" id="monto" name="monto" required/><span id="res_monto"></span></td> <td height="30"> </td> <td><input type="text" id="comanda" name="comanda" required/><span id="res_comanda"></span></td> <td height="30"> </td> <td><input type="text" id="movil" name="movil" required/><span id="res_movil"></span></td> <td colspan="3" align="center"><input type="submit" id="submit" value="Guardar" /></td>
ojala puedan ayudarme.
Saludos.