HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
email url
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML
View previous topic :: View next topic  
Author Message
johny



Joined: 02 Nov 2008
Posts: 4

PostPosted: Mon Nov 03, 2008 2:05 am     email url Reply with quote

Hi

is there a way of clicking on some text on my webpage that when clicked opens up you default email programs and emails the url of the site you are on
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Mon Nov 03, 2008 7:50 pm     Reply with quote

Could be done with an extended "mailto:" link properly coded.
johny



Joined: 02 Nov 2008
Posts: 4

PostPosted: Wed Nov 05, 2008 1:38 am     Reply with quote

any idea what the code would be
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Thu Nov 06, 2008 7:15 pm     Reply with quote

Code:
<a href="mailto:youatURL.com?body=Page's full URL here. Be sure to add file name.">


Example:
Code:
<a href="mailto:googleatgmail.com?body=http://google.com/search.php">


Note: The "@" symbol gets converted to the word "at" within the code tags above.

Add that to each page you have since the base URL will be the same, but the file name will change. Could do it better if you used a scripting language like PHP as that will do it server side and not depend on user using their own email program.
johny



Joined: 02 Nov 2008
Posts: 4

PostPosted: Mon Nov 10, 2008 1:27 am     Reply with quote

does not seem to be working for me for some reason, is there a way that i can insert a variable name into the body of the email, the page name is captured in a variable in a Java script in the code
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Mon Nov 10, 2008 7:45 am     Reply with quote

Post the code you used or the page link where used.
johny



Joined: 02 Nov 2008
Posts: 4

PostPosted: Tue Nov 11, 2008 1:31 am     Reply with quote

<a href="mailto:john.9.williamsatopenreach.co.uk?subject=http://openreacharisprocess.intra.bt.com/john/bns_amendments/index.htm/search.php">mail</a><br>
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Sun Nov 16, 2008 1:23 pm     Reply with quote

This part, "http://openreacharisprocess.intra.bt.com/john/bns_amendments/index.htm/search.php", gets put into the subject line of my email.

Using this, "<a href="mailto:john.9.williamsatopenreach.co.uk?body=http://openreacharisprocess.intra.bt.com/john/bns_amendments/index.htm/search.php">mail</a>" will open this, "http://openreacharisprocess.intra.bt.com/john/bns_amendments/index.htm/search.php", into the body of the email.

If the JS can write what you want after the "body=" for each page, I'm sure that will appear in the body of the email.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial