PDA

View Full Version : "e-mail this page" script



loifinc
02-07-2005, 08:13 PM
Anyone knows where to get an "e-mail this page" script?

thanx

geof

mwinter
02-07-2005, 08:44 PM
Anyone knows where to get an "e-mail this page" script?What exactly is an "e-mail this page" script supposed to do?

Mike

loifinc
02-07-2005, 08:53 PM
like this one on yahoo:
http://mtf.news.yahoo.com/mailto?url=http%3a//story.news.yahoo.com/news%3ftmpl=story%26u=/ap/20050207/ap_on_go_pr_wh/bush_budget_5&title=Bush%27s+%26#36%3b2.57T+Budget+Plan+Seeks+Steep+Cuts%0a&prop=dailynews&locale=us&h1=ap/20050207/bush_budget&h2=T&h3=544

it will e-mail entire page in html

loifinc
02-09-2005, 01:41 AM
:confused: Anyone has the info on this script??????
I need it ASAP.

Thanx

cr3ative
02-09-2005, 09:06 AM
I don't think Javascript can help you here.

cr3ative

loifinc
02-16-2005, 01:45 AM
i did not put my msg in javascript.
why would you move it here knowing that js is not gonna do it?

Eh?

dikuss

cr3ative
02-16-2005, 10:16 AM
Don't look at me, I didn't move it. I can't :P

What I'm saying is that I don't think a script like you are describing exists.

cr3ative


dikussTalk english, as well.

donlopez
02-19-2005, 09:45 AM
this script is to have a 'email this page' function on your page so when you click on it it will also automatically pass the URL into the receivers email. you can also add your own message to the email before its sent.

======================================================================================

put this script into the head of the page where the 'email this page' text link is:

<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(surl=theURL+"?"+self.location
);
}

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
if(window.screen)if(isCenter)if(isCenter=="true"){
var myLeft = (screen.width-myWidth)/2;
var myTop = (screen.height-myHeight)/2;
features+=(features!='')?',':'';
features+=',left='+myLeft+',top='+myTop;
}
surl=theURL+"?"+self.location
window.open(surl,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
</script>

====================================

then add the following to the link

<A href="javascript:;" onClick="OpenBrWindow('EMAIL FORM PAGE.htm','Test','','400','400','true')">email this page</a>


=========================================================================

use this to create the email page form:

<table width="400" border="0" cellspacing="0" cellpadding="0" height="227">
<FORM name="bldlink">
<tr align="center" valign="top">
<td class="emailtitle" colspan="2" height="20">Please enter the following
details</td>
</tr>
<tr align="center" valign="top">
<td class="emailhd" height="50">Friends name<br>
<input type="text" size="30" name="fname" style="width:140px;font size:10px">
</td>
<td align="center" class="emailhd" height="50">Friends email address<br>
<input type="text" size="30" name="femail" style="width:140px;font size:10px">
</td>
</tr>
<tr align="left" valign="top">
<td height="50" colspan="2" class="emailhd">Please enter your name <br>
<input type="text" size="30" name="yname" style="width:140px;font size:10px">
</td>
</tr>
<tr align="left" valign="top">
<td colspan="2" class="emailhd"> Enter your personal message below
<textarea name="pmsg" rows="6" cols="60" wrap="hard" onFocus="document.bldlink.pmsg.select()" style="width:300px;font size:11px">Enter a personal message to your friend.</textarea>
</td>
</tr>
</FORM>
</table>
<table width="400" border="0" cellspacing="0" cellpadding="0" height="26">
<FORM name="sndlink" method="post" action="" enctype="text/plain" onSubmit="return buildmsg()" >
<tr>
<td align="center" valign="middle">
<INPUT TYPE="hidden" NAME="message">
<INPUT TYPE="submit" VALUE="Send It" style="width:80px;font size:10px"> <INPUT TYPE="reset" VALUE="Clear the form" style="width:80px;font size:10px" onClick="document.bldlink.reset();document.bldlink.fname.focus()"> <input type="button" value="Close Window" onClick="window.close()" style="width:80px;font size:10px">
</td>
</tr>
</FORM>
</table>

now add the following script in the head of the email page form:

<SCRIPT LANGUAGE="JavaScript">
<!--

var linkid=unescape(location.search.substring(1,location.search.length))
function buildmsg()
{
df=document.bldlink
if(df.fname.value.length<1)
{
alert("Please enter your friends name.")
df.fname.focus()
return false
}
else
{
if(df.femail.value.indexOf("@")==-1 ||
df.femail.value.indexOf(".")==-1 ||
df.femail.value.indexOf(" ")!=-1 ||
df.femail.value.length<6)
{
alert("The Email address for your friend must have a @ sign,\r a period and be at least 6 characters long.")
df.femail.focus()
return false
}
else
{
if(df.yname.value.length<1)
{
alert("Please enter your name.")
df.yname.focus()
return false
}
else
{
document.sndlink.action="mailto:"+df.femail.value+"?subject=BemroseBooth Intelligence Centre link from "+df.yname.value
document.sndlink.message.value="\r\rHello "+df.fname.value+" I thought you might like to read this article from\rBemroseBooth Intelligence Centre.\r\r "+df.yname.value+" \r\rClick on the link below and find out what it\'s all about!\r\r "+linkid+" \r\r"+df.pmsg.value
}
}
}
}
//-->
</SCRIPT>


=======================


now place the following in the <body tag:

<body onLoad="document.bldlink.reset();document.sndlink.reset();document.bldlink.fname.focus()" leftmargin="10" topmargin="0">


=============================================

Flow
07-27-2007, 03:40 AM
Diggin' up an old one here!

This post is from '05, but I'm hoping someone out there can find out why the script isn't working.

It sends the mail, with the right subject and from the right person, but there's nothing in the message body. ...

Anyone can figure out why??

thanks!
Michelle