Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

webscipt to "email this page"


  • Please log in to reply

#1
truebritmega

truebritmega

    New Member

  • Member
  • Pip
  • 3 posts
does anyone know where i can get some webscript so visitors to my site can "email this page to a friend"
where when they click it they also have to give there email address in some kinda form?

hopes my question makes sense lol and that someone can help lol
  • 0

Advertisements


#2
The Architect

The Architect

    Member

  • Member
  • PipPip
  • 58 posts
Here's a Javascript solution:

JavaScript Source

There are also a number of scripts available that rely on PHP, CGI or ASP - but you'd need to ensure your webhost supports these - if so, I can provide links...
  • 0

#3
Magosis

Magosis

    Retired Staff

  • Retired Staff
  • 190 posts
there is an example of a php scrpt for this in the tutorials forum. another option would be to do it with javascript

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document

  
  <HEAD>
  
  <script LANGUAGE="JavaScript">
  
  <!-- 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>
  </HEAD>
  
  
  <BODY>
  
  <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>
  
  
  
  <!-- Script Size:  1.63 KB -->

  • 0

#4
Magosis

Magosis

    Retired Staff

  • Retired Staff
  • 190 posts
looks like The Architect beat me to it. well good luck :tazz:
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP