![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
07/02/2002, 09:50
|
| | Fecha de Ingreso: enero-2002 Ubicación: Madrid
Mensajes: 93
Antigüedad: 23 años, 1 mes Puntos: 0 | |
Re: Urgente Ayuda Por Favor!!! Respuesta rápida.
Mira el funcionamiento de este código te puede ser de utilidad, quita las partes que no necesites e incluye tu propio formulario.
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Principio de código
var inicialsubj="Te recomienda una Web."
var inicialmsg="Hola soy "
var segundomsg=", te recomiendo que visites esta Web: "+ window.location
var good;
function ValidarDir(field) {
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.go v)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.co op)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
if (goodEmail) {good = true;}
else {
alert('Introduzca una dirección valida.');
field.focus();
field.select();
good = false;
}
}
function mandarUrl() {
good = false
ValidarDir(document.eMailer.email);
if (good) {
window.location = "mailto:"+document.eMailer.email.value+& quot;?subject="+inicialsubj+"&body=& quot;+inicialmsg+document.eMailer.nombre.value+seg undomsg
}
}
// Fin de código -->
</script>
</head>
<body>
<form name="eMailer">
<font face="Arial" size="2">Soy</font>
<input type="text" name="nombre" size="15" value="Tu nombre">
<font face="Arial" size="2">te recomiendo esta Web
<input type="text" name="email" size="15" value="e-mail">
<input type="button" value="Enviar" onClick="mandarUrl()">
</font>
</form>
</body>
</html>
Suerte The Trainee..
:)
<A HREF= "http://www.garaje.ya.com/trainee/trucos/"><IMG SRC="http://www.garaje.ya.com/trainee/trucos/d_banner.gif" border=0 alt="Accede a trucos The Trainee"></a> |