Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    The Omega-3 system
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    'refer a friend' javascript?

    Is there a script available that allows you to let the surfer refer your site to a friend through a pop-up form of some kind. You know the kind where they enter their email and their friends emails and maybe it includes the url and a message, etc.?

    thanks

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I pretty sure I've seen scripts like that. Try a google search

    http://www.google.com/advanced_search

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It uses the clients default email application:

    Code:
    <script>
    function sender() {
    emls = document.form1.emls.value;
    subj = "You gotta see this site";
    bod = "You gotta check out this site: "+window.location+"";
    loc = "mailto:"+emls+"?subject="+subj+" &body="+bod+"";
    document.location=loc;
    }
    </script>
    
    Seperate emails woth commas -->  ,  <--
    
    <form name="form1" onSubmit="sender(); return false;">
    <input type="text" name="emls">
    <input type="submit" value="Send">
    </form>
    If you want it to go to the recipient directly you'll need server-side.

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    multiple line email body possible?

    I have used your method to call the client email program to send an email. Is it possible I can put in a few lines of text in the email body. I somehow do not know/cannot put a linefeed in the body.

    Any help is appreciated.

    Will


  •  

    Posting Permissions

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