Results 1 to 3 of 3

Thread: Email This Link To A Friend

  1. #1

    Email This Link To A Friend

    I am using the Free Code Found @ JavaScriptCity for emailing. The code fills out the recipients address and subject line. Is there a way to make the code collect the link of the current page and include it in the body of the email along with additional marketing lingo...? or Perhaps you can lead me to a better JS...

    Thank You So Much For The Help & Merry Christmas to All...

    <SCRIPT language="JavaScript">
    <!--
    /* Get this script and more at JavaScript City: http://www.javascriptcity.com */

    function e_friend()
    {
    var e_add= prompt('Enter your friend\'s email address:',' ');
    var subj= prompt('Enter the subject of your message:',' ');
    if ((subj==" ") || (subj==null))
    subj="Looking For New Homes..? Check This Site Out..!!";
    window.location="mailto:"+e_add+"?subject="+subj;
    }

    //-->

    </SCRIPT>
    Charlie Perez

  2. #2
    Senior Member
    United States kc's Avatar
    Join Date
    Jul 2000
    Location
    Just a wee bit too close to the guy with the Porsche.
    Posts
    924

    Might help

    Hi Charlie,

    Welcome to the City.
    See if this helps ya.

    http://javascript.internet.com/page-...this-page.html
    A man sooner or later discovers that he is the master-gardener of his soul, the director of his life.
    ~ James Allen

  3. #3
    Hi Charlie,

    You can just add location.href to any string you want...


    function e_friend()
    {
    var e_add= prompt('Enter your friend\'s email address:',' ');
    var subj= prompt('Enter the subject of your message:',' ');
    if ((subj==" ") || (subj==null))
    subj="Looking For New Homes..?";
    subj += " Check This Site Out.." + location.href;
    window.location="mailto:"+e_add+"?subject="+subj;
    }
    Piglet.

    Off on a long term sabatical, playing UT2004 at The Titan server

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. email link to a friend - text not button?
    By dirksmith in forum Client-side forum
    Replies: 1
    Last Post: 27th November 2005, 14:52
  2. JavaScript email to a friend link?
    By dirksmith in forum Client-side forum
    Replies: 3
    Last Post: 27th November 2005, 14:49
  3. Email to a friend with URL clickable
    By lorensr in forum Client-side forum
    Replies: 22
    Last Post: 8th June 2002, 16:23
  4. Email link and opening aol email
    By local_h in forum Client-side forum
    Replies: 5
    Last Post: 15th October 2001, 19:06
  5. email to a friend
    By silverfox63 in forum Server-side Forum
    Replies: 1
    Last Post: 1st August 2001, 05:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •