Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/01/2010, 05:35
cparada
 
Fecha de Ingreso: abril-2006
Mensajes: 14
Antigüedad: 18 años
Puntos: 0
Exclamación Respuesta: Error en formulario

Cita:
Iniciado por pateketrueke Ver Mensaje
¿cual formulario??
ESTE ES EL CODIGO COMPLETO DE LA PAGINA.
Te repito que en IE y MOzilla anda perfecto el problema es en Chrome
AGRADEZCO CUALQUIER AYUDA

<?php
$enviado = -1; // Controla si se envia o no
if (isset($_POST['nombre'])) { // Verifica si viene desde el formulario o se carga la pagina por primera vez
$to = '[email protected]'; // Se envia al webmaster la primer copia
$mensaje = 'El mensaje lo envio ' . $_POST['nombre'] . ' desde su email ' . $_POST['email'] . "\n"
. ' Direccion ' . $_POST['direccion']. ' CodigoPostal ' . $_POST['codigoPostal']. ' Ciudad ' . $_POST['ciudad']. "\n"
. ' Departamento ' . $_POST['departamento']. ' Empresa ' . $_POST['empresa']. ' Telefono ' . $_POST['telefono']. ' Celular ' . $_POST['celular']
. ' Fax ' . $_POST['fax'];


$remitente = "[email protected]";

$cabeceras = "From: $remitente\n";
$cabeceras .= "Content-Type: text/html";


mail($to, "Evento 1 de Educomp", $mensaje, $cabeceras); // envio al webmaster


//$to = $_POST['email']; // SE envia al usuario la segunda copia
$mensaje = 'El mensaje ha sido recibido, te responderemos pronto.';
//mail($to, "Asunto del Mensaje", $mensaje); // Envio al usuario
$enviado = 1; // Marca que se envio OK
}

if ($enviado == 1) { // Se envio ??
header("Location: mensajeok.htm");
}

?>




<HTML><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body {
background-image: url(images/fondo_form.png);
background-color: #FFFFFF;
}
.Estilo6 {font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #567587; }
.Estilo8 {font-family: Verdana, Arial, Helvetica, sans-serif}
.Estilo10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
.Estilo11 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 3px; }
.Estilo12 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 4px; }
#Layer1 {
position:absolute;
left:-87px;
top:78px;
width:783px;
height:405px;
z-index:2;
}

-->
</style>

<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<link href="CG_Estilos.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
#apDiv12 {
position:absolute;
left:272px;
top:606px;
width:79px;
height:75px;
z-index:8;
}
#apDiv13 {
position:absolute;
left:246px;
top:580px;
width:343px;
height:146px;
z-index:8;
background-image: url(images/links_dedo.png);
}
#apDiv14 {
position:absolute;
left:224px;
top:278px;
width:239px;
height:59px;
z-index:9;
}
#apDiv15 { position:absolute;
left:297px;
top:284px;
width:201px;
height:82px;
z-index:10;
}
-->
</style>
<BODY link="#567587" vlink="#567587" alink="#567587" leftMargin=0 topMargin=0 rightMargin=0 bottomMargin=0 marginwidth="0"
marginheight="0">
<div id="apDiv4">
<table width="100%" border="0">
<tr>
<td width="8%">&nbsp;</td>
<td width="84%">&nbsp;</td>
<td width="8%">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="Estilo1">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><span class="Estilo1">&nbsp;&nbsp;CONTACTO</span></td>
<td>&nbsp;</td>
</tr>
</table>
<div id="Layer1">
<p class="Estilo6">&nbsp;</p>
<form name="form1" method="post" action="">
<table cellspacing="0" cellpadding="0">
<TR valign="top">
<TD colspan="2" class="Estilo10">&nbsp;</TD>
</TR>
<TR valign="top">
<TD colspan="2" class="Estilo10"><div align="center" class="Estilo5">
<div align="right">*Nombre y Apellido:

<input name="nombre" type="text" id="nombre" size="55" >
</div>
</div></TD>
</TR>
<TR valign="top">
<TD height="10" colspan="2" class="Estilo11">&nbsp;</TD>
</TR>
<TR>
<TD width="251" valign="top" class="Estilo10"><div align="right" class="Estilo5">*Direcci&oacute;n:&nbsp;</div></TD>
<TD width="494"><input name="direccion" type="text" id="direccion" size="30"onblur="MM_validateForm('direccion','','R ');return document.MM_returnValue" >
<span class="Estilo5">&nbsp;C&oacute;digo Postal: </span>
<input name="codigoPostal" type="text" id="codigoPostal" size="18"></TD>
</TR>
<TR valign="top">
<TD height="12" colspan="2" class="Estilo12"><div align="center"></div></TD>
</TR>
<TR>
<TD valign="top" class="Estilo10"><div align="right" class="Estilo5">*Ciudad:&nbsp; </div></TD>
<TD><input name="ciudad" type="text" id="ciudad" size="24"onblur="MM_validateForm('nombre','','R',' ciudad','','R');return document.MM_returnValue">
&nbsp;&nbsp;&nbsp;<span class="Estilo5">*Departamento:</span>
<input name="departamento" type="text" id="departamento" size="21">
</span></TD>
</TR>
<TR valign="top">
<TD colspan="2" class="Estilo10">&nbsp;</TD>
</TR>
<TR valign="top">
<TD class="Estilo10"><div align="right"><span class="Estilo5">Empresa:&nbsp;</span><span class="Estilo8"><BR>
</span></div></TD>
<TD class="Estilo10"><input name="empresa" type="text" id="empresa" size="28">
&nbsp;<span class="Estilo5"> E-Mail:
<input name="email" type="text" id="email" onBlur="MM_validateForm('email','','NisEmail');ret urn document.MM_returnValue" size="27">
</span></TD>
</TR>
<TR valign="top">
<TD colspan="2" class="Estilo10">&nbsp;</TD>
</TR>
<TR>
<TD valign="top" class="Estilo10"><div align="right"><span class="Estilo5">*Tel&eacute;fono:&nbsp;</span><span class="Estilo8"><BR>
</span></div></TD>
<TD><input name="tel" type="text" id="tel" size="17"onblur="MM_validateForm('celular','','Nis Num');return document.MM_returnValue" >
<span class="Estilo5">&nbsp;&nbsp;M&oacute;vil: </span>
<input name="celular" type="text" id="celular" size="17"onblur="MM_validateForm('celular','','Nis Num');return document.MM_returnValue" >
<span class="Estilo5">&nbsp;Fax::
<input name="fax" type="text" id="fax" size="10"onblur="MM_validateForm('fax','','NisNum' );return document.MM_returnValue" >
</span> </span></TD>
</TR>
<TR>
<TD valign="top" class="Estilo10"><div align="right"><span class="Estilo8"><BR>
</span></div></TD>
<TD>&nbsp;</TD>
</TR>
<TR>
<TD valign="top" class="Estilo10">&nbsp;</TD>
<TD><label>
<input name="cmdEnviar" type="submit" id="cmdEnviar" onClick="MM_validateForm('nombre','','R','direccio n','','R','departamento','','R','email','','NisEma il','celular','','NisNum','fax','','NisNum');retur n document.MM_returnValue" value="Enviar">
</label></TD>
</TR>
<TR>
<TD valign="top" class="Estilo10">&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>
<TR>
<TD valign="top" class="Estilo10">&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>
</table>
</form>
</div>
</div>
<div id="apDiv11"></div>
</BODY>
</HTML>