JessieO
10-16-2003, 11:37 PM
I need to add a "Send this page to a friend" link to a site... Is there a quick & easy way? Thanks!
|
Click to See Complete Forum and Search --> : How to make a... "Send this page to a friend" links JessieO 10-16-2003, 11:37 PM I need to add a "Send this page to a friend" link to a site... Is there a quick & easy way? Thanks! starrwriter 10-17-2003, 12:41 AM I would think this requires some type of (server side?) script. If I wanted to find out how it's done, I would go to an existing page that has this feature, open the page in my WYSIWYG editor, highlight the link and then look at the underlying code. shanuragu 10-17-2003, 12:53 AM This question should have come under javascript section!! Any way here is the code try it out !! <html> <head> <link rel='stylesheet' type='text/css' href='../js/css/shn.css'> <script language='JavaScript' src='../js/js/shn.js' type='text/javascript'></script> <script language="javascript"> function validate() { if (document.form.eaddress.value=="") { alert("Cannot leave blank...Enter email address"); document.form.eaddress.focus(); return false; } return true; } function mailThisUrl() { if (validate()) { mail = "mailto:" + document.form.eaddress.value + '?subject=This Web Site might interest you!!!'; mail += "&body=" + "http://www.websitename.com"; location.href = mail; } } </script> </head> <body> <form name="form"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <font class="shnText">Recommend This Web Site to a friend!</font> </td> </tr> <tr> <td> <font class="shnText">Type in Recipient's e-mail address</font> </td> </tr> <tr> <td> <input type="text" name="eaddress" value="" size="25"> </td> </tr> <tr> <td align="center"> <input type="button" class="buttonSHN" value="Send" onClick="mailThisUrl();"> </td> </tr> </form> </body> </html> Change the website name accordingly & a validation for email address inf necessary. You just have to enter friends email address/s & click send to open email box. shara Daria 10-17-2003, 09:44 AM THIS THREAD (http://forums.webdeveloper.com/showthread.php?s=&postid=102238#post102238) has a pretty awesome code (just tried it myself), if you can use PHP. moonrakre 06-22-2010, 05:08 AM Hi, This thread refers to some css and js files:<link rel='stylesheet' type='text/css' href='../js/css/shn.css'> <script language='JavaScript' src='../js/js/shn.js' type='text/javascript'></script> Where can I get copies of these files, and are they available for general use, please? Adrian webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |