Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/04/2002, 09:19
bet
 
Fecha de Ingreso: febrero-2001
Mensajes: 292
Antigüedad: 24 años
Puntos: 0
Re: Deseo crear Formulario de Suscripción

Algo así?

Código:
<html>
<head>
<title> New Document </title>
<script language="JavaScript">
<!--
function checkForm(frm){

if(frm.cole.value == ""){
alert("Informa el colegio");
frm.cole.focus();
return false;
}

if (frm.email.value == "") { 
alert("Por favor ingrese su dirección de e-mail"); 
frm.email.focus(); 
return false; 
}

if (frm.email.value.indexOf('@', 0) == -1 || frm.email.value.indexOf('.', 0) == -1) { 
alert("Dirección de e-mail inválida"); 
frm.email.focus(); 
return false; 
}

if(frm.tel.value == ""){
alert("Informa el telefono");
frm.tel.focus();
return false;
}

if(frm.nombre.value == ""){
alert("Informa el nombre");
frm.nombre.focus();
return false;
}

var x = 0;
for (i=0;i<document.forms[0].length;i++){
	if ((document.forms[0].elements[ i].type) == "checkbox"){
		x = x + (document.forms[0].elements[ i].checked)?1:0;
	}
}

if (x < 1){
	alert("Selecciona uno check");
	frm.Educacion.focus();
	return false;
}

if(frm.Educacion.checked){ frm.Educacion.value = "SI";}

if(frm.Cursos.checked){frm.Cursos.value = "SI";}

if(frm.Tutoriales.checked){frm.Tutoriales.value = "SI";}

if(frm.Otro.checked){frm.Otro.value = "SI";}
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF">

<form method=post action="http://www.melodysoft.com/cgi-bin/form.cgi" onSubmit="return checkForm(this);">
<input type="hidden" name="recipient" value="[email protected]">
<input type="hidden" name="subject" value="Secundario">
<input type="hidden" name="redirect" value="http://www.tusitio.com/gracias.html">

Colegio <input type="text" name="cole"><br>
E-mail<input type="text" name="email"><br>
Telefono<input type="text" name="tel"><br>
Nombre completo<input type="text" name="nombre"><br>
sigue...