Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JavaScript and AJAX (http://www.go4expert.com/forums/javascript/)
-   -   "Invite a friend" (http://www.go4expert.com/forums/invite-a-friend-t7051/)

liquidagoracom 26Oct2007 08:56

"Invite a friend"
 
I need to put a form in my website www.liquidagora.com where people can enter a friend's email and automatically the site sends an email to that person.


I don't even know how is that called, So I couldn't search here on the forum.

I'd appreciate any resource with a code to do that.



Thank you very much

Luiz

shabbir 26Oct2007 09:03

Re: "Invite a friend"
 
What server side language you are using. Its not possible to do that using Plain HTML

pradeep 26Oct2007 11:02

Re: "Invite a friend"
 
A simple solution to the problem would be to put a mailto: link in your page, using a bit of javascript!

Code: HTML

<script language='JavaScript'>
function doEmail()
{
    var email = document.getElementById('email').value;
    var uri = 'mailto:'+email+'?Subject=Check this out&Body=Check out http://go4expert.com';
    document.getElementById('ifr').innerHTML = '<iframe src="'+uri+'"></iframe>';
}
</script>
<input type="text" name="email" id="email"> <input type="button" value="Send To Friend" onClick="doEmail();">
<span id='ifr' style='display:none'></span>


shabbir 26Oct2007 17:52

Re: "Invite a friend"
 
For a mailto link you can do without js as well.


All times are GMT +5.5. The time now is 09:36.