Here is all the code:
The Script in the Header:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
//Tell-a-friend script
//Carl Dimmer
var initialsubj="ddd"
var initialmsg=" "+window.parent.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>
The Form in the Body:
<form name="eMailer">
<div align="center"><font size="2" face="Georgia, Times New Roman, Times, serif">Send
this page to 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">
<input name="button" type="button" onClick="mailThisUrl();" 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" value="Send">
</font><br>
</div>
</form>
You can view what I am trying to do by going to
and going to the store, look at an item in detail, then click on print, you will then understand how it looks.