...

View Full Version : 'refer a friend' javascript?



ubtheboss
07-30-2002, 01:25 AM
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 :)

Graeme Hackston
07-30-2002, 04:06 PM
I pretty sure I've seen scripts like that. Try a google search

http://www.google.com/advanced_search

x_goose_x
07-30-2002, 05:23 PM
It uses the clients default email application:



<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.

wrothwell
08-05-2002, 12:29 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum