Open
a your webpage that you want your tell a friend email
box to appear on, in a program such as Wordpad or
Notepad and paste the above text
(ctrl 'V') in
between the HEAD Tags of the document.
The
head of your webpage should now look like the code
directly below. Edit the RED
text only to reflect your information. In the email
body fields. You must use \n to signify a line break.
Do not delete this code. Do not make your message
over 30 characters.
<HEAD>
<SCRIPT
LANGUAGE="JavaScript">
<!-- Begin
var
initialsubj="Hey buddy,
take a look at this"
var initialmsg="Hi:\n
You may want to check out
this site:\n "
+window.location
var good;
function checkEmailAddress(field) {
var
goodEmail =
field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|
(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum
)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
if (goodEmail) {
good = true;
}
else {
alert('Please enter a valid address.');
field.focus();
field.select();
good = false;
}
}
u = window.location;
function mailThisUrl() {
good = false
checkEmailAddress(document.eMailer.email);
if (good) {
//window.location
=
"mailto:"+document.eMailer.email.value+"?
subject="+initialsubj+"&body="+document.title+"
"+u;
window.location =
"mailto:"+document.eMailer.email.value+"?
subject="+initialsubj+"&body="+initialmsg
}
}
// End -->
</script>
</HEAD>
|