Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to email webpage URL

Status
Not open for further replies.

sdollen

Technical User
Oct 12, 2002
24
US
I've been looking for a free script which when clicked on, it will open up an email application and the person just fills in the receiver's email address. The URL and the webpage is sent to the receiver. Any idea where I can find this? I noticed on on the following webpage and thought it was really nice -
I appreciate your help!

sdollen1@cox.net
 
Try this:
Code:
<a href=&quot;mailto:&quot;>Open a mail client</a> [center][img]http://uniment.netfirms.com/bluebrain.gif[/img]  [img]http://uniment.netfirms.com/blueuniment.gif[/img][/center]
 
i think that ÿ happens when you dont close your code tag. Suceess, thats the way you spell success!
 
Yes, I know... Sometimes, though, I get lazy and don't close the [ignore]
Code:
[/ignore] tag (especially when the question was so simple that it required just one line of code), and I don't press Preview. [center][img]http://uniment.netfirms.com/bluebrain.gif[/img]  [img]http://uniment.netfirms.com/blueuniment.gif[/img][/center]
 
Well, I appreciated the response...but, it wasn't quite what I was looking for. That may explain why you thought the one-line code was so simple. Check out the java for the &quot;send this to a friend&quot; email on the bottom of the link I provided. Or, actually, this forum uses I think the same exact type java script on their &quot;Tell a friend&quot; link.

 
On the link you gave, somehow I can't find the link you described.

As for Tek-Tip's e-mailing script, it uses a CGI script on the Tek-Tips server to send an e-mail to the address you specify. Don't ask, I don't know enough CGI for it.
bluebrain.gif
blueuniment.gif
 
Sorry...I had it in the original post and not my response. I appreciate your time and effort you've taken corresponding on this already... I don't really know CGI either, and barely Java... what I really need to do is buy a good beginners Java book...

Thanks for your help!



 
try this :

Code:
<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
<!--
  function sendToFriend(form,field) {
    window.open('mailto:'+document[form][field].value+'?subject=Check this URL&body='+location.href);
  }
//-->
</script>
<form name=&quot;foo&quot;>
  E-mail <input type=&quot;text&quot; name=&quot;email&quot;><br />
  <input type=&quot;submit&quot; value=&quot;Send to Friend&quot;>
</form>
Regards

Big Bad Dave

davidbyng@hotmail.com
 
oops I forgot you need to add the script to the form action :

<form name=&quot;foo&quot; action=&quot;javascript:sendToFriend('foo','email');&quot;> Regards

Big Bad Dave

davidbyng@hotmail.com
 
Check out my homepage and then go to the email a friend
page! I think thats what you want. Correct me if im wrong.
(The script is easily adjustable)

Greetz, BobbaFet

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top