Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/08/2010, 14:24
Avatar de wladtepes
wladtepes
 
Fecha de Ingreso: febrero-2008
Mensajes: 140
Antigüedad: 16 años, 3 meses
Puntos: 0
Exclamación submit con Enter en IE7

Hola tengo un pequeño buscador y en firefox al hacer enter el formulario se procesa pero en IE7 no hace nada he problado varios codigos pero nada aun no se di sera el codigo o el navegador que no procesa el submit

adjunto el codigo

Código PHP:
<?php
ob_start
();
session_start();
include(
"base.php");
if (!isset(
$user))
{
$user='';}
if ((
strlen($user))< )

MsgError(2,1);
}
else{
$link=Conectarse_MYSQL();
$nivel='';

?>
<!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" />
<meta http-equiv="content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<link  href="css/css_informe.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/estilo.css" rel="stylesheet" type="text/css" />
<head>
<script language="javascript">
function validar()
{
a=document.form1;
if(a.rut.value=='')
{
alert("Ingrese un RUT Valido");
a.rut.focus();
return false;
}
}
</script>

</head>
<body>

<table border="0" align="center">
<tr>
<td width="793" height="85" align="center" ><img  src="imagen.jpg" width="663" height="78">
</td>

</tr>
 <tr align="right">
        <td > 
        <form name="finsesion" method="post" action="finsesion.php">    
        <input type="image" src="img/exit_64x64.png" width="24" height="24">
             </form>
        </td>
      </tr>
</table>
<br>
<form name="form1" id="form1" action="busqueda.php" method="post" onSubmit="return validar();" >
<table width="394"  align="center">
<tr>
<td width="128">
<p class="text"><B>INGRESAR RUT</B></p>
</td>
<td width="144">
<input type="rut" name="rut" id="buscar" maxlength="10"/>
</td>
<td width="106"><p class="text">Ej:11111111-1</p></td>
</tr>

<tr>
<td  colspan="3"  align="center">

  <input  type="submit" name="BUSCAR" class="boton" value="BUSCAR" >

</td>
</tr>
</table>
</form>




<table width="663" border="0"  align="center">
  <tr>
    <td width="101"   bgcolor="#000000"><div  class="text2"><b>Nombre</b></div></td>
    <td width="46"   bgcolor="#000000"><div  class="text2"><b>Rut</b></div></td>
    <td width="79"   bgcolor="#000000"><div  class="text2"><b>Direccion</b></div></td>
    <td width="60"   bgcolor="#000000"><div  class="text2"><b>Comuna</b></div></td>
    <td width="57"   bgcolor="#000000"><div  class="text2"><b>Ciudad</b></div></td>
    <td width="87"   bgcolor="#000000"><div  class="text2"><b>Fecha Envio</b></div></td>
    <td width="77"   bgcolor="#000000"><div  class="text2"><b>Folio</b></div></td>
    </tr>
   <tr>
<?php

if(isset($_POST['BUSCAR']) && "BUSCAR"==$_POST['BUSCAR'])
{
    
$rut2=$_POST['rut'];
    
$sql="select * from tarjetas where rut='".$rut2."'";
//echo $sql;
$sql0 =mysql_query($sql,$link) or die('La consulta XXX fall&oacute;: ' mysql_error());
$numero_filas=mysql_num_rows($sql0);

if(
$numero_filas!=0)
{
    
if (
$row mysql_fetch_array($sql0))
{  
do {
         
    
$nombre_completo=$row['nombre_completo'];
    
$rut=$row['rut'];
    
$Direccion=$row['Direccion'];
    
$Comuna=$row['Comuna'];
    
$Ciudad=$row['Ciudad'];
    
$Fecha_Envio=$row['Fecha_Envio'];
    
$Folio=$row['Folio'];
         
    
?>

 <td class="text3"><b><?php echo $nombre_completo?></b></td>
 <td class="text3"><b><?php echo $rut?></b></td>
 <td class="text3"><b><?php echo $Direccion?></b></td>
 <td class="text3"><b><?php echo $Comuna?></b></td>
 <td class="text3"><b><?php echo $Ciudad?></b></td>
 <td class="text3"><b><?php echo $Fecha_Envio?></b></td>
 <td class="text3"><b><?php echo $Folio?></b></td>
 </tr>
 <?Php    
 
}
  
//cierre del do
while ($row mysql_fetch_array($sql0));
{
?>

</table>
<?php

}
else
 {
 echo
"no hay datos ";
}
mysql_close($link);

exit();
}

else {echo 
"<script> alert('LA CONSULTA NO ARROJO NINGUN DATO');  </script>";}
// primer if 


?>

</body>
</html>
<?php
}




}
ob_end_flush();
?>

de antemano gracias