Return to Snippet

Revision: 6101
at April 28, 2008 06:35 by skywalker


Initial Code
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Ronnie T. Moore -->
<!-- Web Site:  The JavaScript Source -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function initMail(form) {
text = "Check out this page:  " + window.location;
form.message.value = "Hi " + form.sendto.value + " (" + form.to.value + "):\n\n"
 + text + "\n\nYour Friend,\n" + form.sendername.value + "(" + form.senderemail.value + ")";
return (form.to.value != "");
}
//  End -->
</script>


//////////////////////////////////////////////////////////////////////////////
//include this form content to pages that you may want to show.


<center>
<form name=emailform method=post action="http://cgi.freedback.com/mail.pl" target="_new" onSubmit="return initMail(this);">
<input type=hidden name=subject value="** Check Out This Site! **">
<input type=hidden name=message value="">
<table>
<tr><td colspan=2 align=center>Tell a friend about this page!</td></tr>
<tr><td>Their Name:</td><td><input type=text name=sendto></td></tr>
<tr><td>Their Email:</td><td><input type=text name=to></td></tr>
<tr><td>Your Name:</td><td><input type=text name=sendername></td></tr>
<tr><td>Your Email:</td><td><input type=text name=senderemail></td></tr>
<tr><td colspan=2 align=center><input type=submit value="Ok!"></td></tr>
</table>
</form>
</center>

Initial URL

                                

Initial Description
This gets the current page addr. and send it... 
Modify form action="" to send values to proper mail function - or - class.

Initial Title
Email this page

Initial Tags
email, url, mail, page

Initial Language
JavaScript