Search in forum:

« View previous topic :: View next topic »  
Author Message
Post11/03/2008 at 3:15pm (UTC)    
Post subject: Tell a friend script


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.

    <!-- 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.');
    good = false;
    u = window.location;
    function mailThisUrl() {
    good = false
    if (good) {
    //window.location = "mailto:""?subject="+initialsubj+"&body="+document.title+" "+u;
    window.location = "mailto:""?subject="+initialsubj+"&body="+initialmsg
    //  End -->
    <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();">
Display posts from previous:   

Powered by phpBB © 2001, 2005 phpBB Group