Let visitors refer others to your webpage (via email) with this script! It asks for the friend's email address, then loads the email program with the essential information pre-filled to instantly send off.
Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var initialsubj="Hay buddy, take a look at this"
var initialmsg="Hi:n You may want to check out this site: "+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>
<form name="eMailer">
Tell a friend:
<input type="text" name="email" size="26" value=" Enter Address Here" onFocus="this.value=''" onMouseOver="window.status='Enter email address here and tell a friend about this site...'; return true" onMouseOut="window.status='';return true">
<br />
<input type="button" value="Send this URL" onMouseOver="window.status='Click to send an email (with this page address) to a friend! Enter email address above...'; return true" onMouseOut="window.status='';return true" onClick="mailThisUrl();">
</form>
Cookies are small packets of data, that we or our partners store locally on your computer, through your browser.
You can prevent the use of cookies anytime by changing the settings of your browser.
We use the following cookies, in concordance with the GDPR :
-Essential cookies: necessary for full functionality of the website.
-Optional cookies: optional and help us improve the website by, for example, analysing user behaviour on the website without personally identifying you.
You can find more information in our privacy statement.