Foros del Web » Programando para Internet » ASP Clásico »

Problemas Formulario

Estas en el tema de Problemas Formulario en el foro de ASP Clásico en Foros del Web. Hola, tengo el mismo formulario en ASP para el que hace unos días pedí la verificación de casillas (Funciona perfectamente, muchas gracias ) pero ahora ...
  #1 (permalink)  
Antiguo 19/05/2004, 00:37
 
Fecha de Ingreso: mayo-2004
Ubicación: ASTURIAS
Mensajes: 10
Antigüedad: 21 años
Puntos: 0
Problemas Formulario

Hola, tengo el mismo formulario en ASP para el que hace unos días pedí la verificación de casillas (Funciona perfectamente, muchas gracias ) pero ahora mi problemilla es otro, todos los datos me los envía correctamente menos 1, q es el "La maquina elegida es la siguiente:" si alguien puede revisar el código y decirme donde metí la pata lo agredecería enternamente.. estos son los códigos:

PÁGINA QUE CONTIENE EL FORMULARIO:

<html>
<head>
<SCRIPT language=JavaScript>
<!--

function Mensaje(element, message) {
alert(message);
element.focus();
}

function Validar(form) {
var validado = false;

if (form.empresa.value == "") {
Mensaje(form.empresa, "Introduzca nombre de la empresa.-");
}
else if (form.nombre.value == "") {
Mensaje(form.nombre, "Introduzca persona de contacto.-");
}
else if (form.direccion.value == "") {
Mensaje(form.direccion, "Introduzca direccion.-");
}
else if (form.email.value.indexOf("@") == -1 ||
form.email.value.indexOf (".") == -1) {
Mensaje(form.email , "Por favor, incluya una dirección electrónica valida.-");
}
else if (form.telefono.value == "") {
Mensaje(form.telefono, "Introduzca telefono.-");
}

else if (form.pedido.value.length <= 0 ) {
Mensaje(form.pedido, "Debe realizar algun pedido antes de enviar.-");
}

else {
validado = true;
}

return validado;
}
//-->
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#333333" marginheight="0" marginwidth="0" bottommargin="0"

leftmargin="0" topmargin="0" link="#333333" >
<div align="center">
<p>&nbsp;</p>
<p><font size="4"><b>MAQUINA: </b></font>
<% response.write(request.querystring("maquina")) %>
<input type="hidden" name="oculto" value="<%response.write(request.querystring("maqui na"))%>">
</p>
</div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<form action="enviar.asp"enviar.asp" method="get" onSubmit="return Validar(this);">
<p>&nbsp; </p>
<table width="757" height="400"border="0" cellpadding="0" cellspacing="10"

background="/imagenes/fondo.gif">
<tr>
<td height="38" width="65" valign="top"><b>Empresa</b></td>
<td valign="top" colspan="3">
<input type="text" name="empresa" id="empresa" size="46">
</td>
<td valign="top" colspan="2"><strong>Persona contacto</strong></td>
<td width="1"></td>
<td colspan="6" valign="top">
<input name="contacto" type=text id="nombre" size="46">
</td>
</tr>
<tr>
<td height="33" valign="top"><b>Direcci&oacute;n</b></td>
<td valign="top" colspan="3">
<input type="text" name="direccion" id="Direccion" size="46">
</td>
<td valign="top" colspan="2"><strong>E-mail:</strong></td>
<td></td>
<td valign="top" colspan="6">
<input name="email" type=text id="E-mail" size="46">
</td>
</tr>
<tr>
<td height="33" valign="top"><strong>Tel:</strong></td>
<td valign="top" colspan="3">
<input name="telefono" type=text id="Telefono" size="46">
</td>
<td width="4"></td>
<td width="81"></td>
<td></td>
<td width="179"></td>
<td width="7"></td>
<td width="9"></td>
<td width="6"></td>
<td width="1"></td>
<td width="47"></td>
</tr>
<tr>
<td height="38" colspan="3" valign="top"><b>Pose&eacute; alguna otra m&aacute;quina
de vending?</b></td>
<td valign="top" colspan="3">
<input type="checkbox" name="otramaquina" value="si">
<b>S&iacute;</b> </td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="38" colspan="3" valign="top"><b>Indique marca y modelo</b></td>
<td valign="top" colspan="6">
<input type="text" name="marca" size="60">
</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="37" colspan="2" valign="top"><b>Recibir respuesta por</b></td>
<td width="1"></td>
<td valign="top" colspan="6">
<input type="checkbox" name="recibirrespuesta" value="email">
Email &oacute;
<input type="checkbox" name="recibirrespuesta" value="telefono">
Tel&eacute;fono </td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="46" colspan="10" valign="top"><b>En los campos siguientes rellene
s&oacute;lo aquellos campos que correspondan al tipo de servicio a contratar:</b></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="24" colspan="5" valign="top">
<div align="center"><b>RENTING O COMPRA</b></div>
</td>
<td colspan="6" valign="top">
<div align="center"><b>EXPLOTACI&Oacute;N</b></div>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td height="40" colspan="5" valign="top">
<div align="center"><b>Incluye Instalaci&oacute;n, Garant&iacute;a y Seguro
todo riesgo</b></div>
</td>
<td colspan="3" valign="top"><b>N&uacute;mero empleados que pueden usar
la m&aacute;quina </b></td>
<td colspan="3" valign="top">
<input type="text" name="nempleados" size="10">
</td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="5" valign="top" height="42"><b>Tiempo
<select name="tiempo" size="1">
<option selected>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
a&ntilde;os </b>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
</td>
<td valign="top" colspan="3"><b>D&iacute;as de trabajo</b></td>
<td colspan="3" valign="top">
<input type="text" name="dias" size="10">
</td>
<td></td>
<td></td>
</tr>
<tr>
<td height="32" colspan="5" valign="top"><strong><font color="#FF0000"><a href="documentacion.htm" target="_blank">Documentaci&oacute;n
a aportar</a></font></strong></td>
<td colspan="3" valign="top"><b>Horas al d&iacute;a</b></td>
<td colspan="4" valign="top">
<input type="text" name="horas" size="10">
</td>
<td></td>
</tr>
<tr>
<td height="2"></td>
<td width="153"></td>
<td></td>
<td width="67"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="43" colspan="5" valign="top">
<input type="Submit" name="Submit" value="Enviar">
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</form>

</body>
</html>


PÁGINA Q ENVÍA LOS DATOS:

<%
Set Mailer=Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName="Pedido"
Mailer.FromAddress="[email protected]"
Mailer.RemoteHost="correoms.acens.net"
Mailer.AddRecipient "Pedido", "[email protected]"
Mailer.Subject="asunto"
Mailer.BodyText="La maquina elegida es la siguiente:" & request.querystring("oculto")&VbCrlf & "Nombre de la empresa:" & request.querystring("empresa")&VbCrlf& "Persona de contacto:" & request.querystring("contacto") & VbCrlf & "Dirección:" & request.querystring("direccion") & VbCrlf & "Teléfono:" & request.querystring("telefono") & VbCrlf & "email:" & request.querystring("email") & VbCrlf & "Otra Maquina Vending:" & request.querystring("otramaquina") & VbCrlf & "Marca Modelo:" & request.querystring("marca") & VbCrlf & "Años de Renting:" & request.querystring("tiempo") & VbCrlf & "Explotacion numero empleados:" & request.querystring("nempleados") & VbCrlf & "Explotacion Dias Trabajo:" & request.querystring("dias") & VbCrlf & "Explotacion Horas al dia:" & request.querystring("horas") & VbCrlf & "Recibir respuesta por:" & request.querystring("recibirrespuesta")
if Mailer.SendMail then
Response.Write "Mensaje enviado con exito"
else
Response.Write"Error en el envio"
end if
%>





UN SALUDETE Y GRACIAS POR DEDICARME VUESTRO TIMEPO
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:26.