gilgalbiblewhee
09-16-2004, 12:10 PM
I have the coding for emailing the URL link. WHat needs to be changed to send the entire page?
<!-- Begin E-Mail-This-Page Script //-->
</span>
<form name="eMailer">
<span class="subheadline_body">
E-MAIL THIS LINK </span><br>
Enter recipient's e-mail: <br>
<input type="text" name="address" size="25">
<br>
<input type="button" value="Send this URL" onClick="mailThisUrl();" name="button">
</form>
<p>
<script language="JavaScript1.2">
var good;
function checkEmailAddress(field) {
// the following expression must be all on one line...
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
good = true
} else {
alert('Please enter a valid e-mail address.')
field.focus()
field.select()
good = false
}
}
u = window.location;
m = "I thought this might interest you...";
function mailThisUrl(){
good = false
checkEmailAddress(document.eMailer.address)
if (good){
// the following expression must be all on one line...
window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;
}
}
</script>
<!-- End E-Mail-This-Page Script //-->
<!-- Begin E-Mail-This-Page Script //-->
</span>
<form name="eMailer">
<span class="subheadline_body">
E-MAIL THIS LINK </span><br>
Enter recipient's e-mail: <br>
<input type="text" name="address" size="25">
<br>
<input type="button" value="Send this URL" onClick="mailThisUrl();" name="button">
</form>
<p>
<script language="JavaScript1.2">
var good;
function checkEmailAddress(field) {
// the following expression must be all on one line...
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
good = true
} else {
alert('Please enter a valid e-mail address.')
field.focus()
field.select()
good = false
}
}
u = window.location;
m = "I thought this might interest you...";
function mailThisUrl(){
good = false
checkEmailAddress(document.eMailer.address)
if (good){
// the following expression must be all on one line...
window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;
}
}
</script>
<!-- End E-Mail-This-Page Script //-->