Email Subject Line Code
I have a web site and on each page I have email contact links (Tech Support, Contact Me, etc). What I want to do is when the end user clicks on the link, the email subject line will display a concatenated string that includes the page title.
I know I can hard code the subject line with the page title (without concatenating anything):
<a href="techsupport:firstname.lastname@example.org?subject="Technical Issue With Poetry Page">Tech Support</a>
But I don't want to hard code each of the links on every page. Is there a way to concatenate using the Title tag? Would I use StringBuilder? If so, what is the correct syntax?
I am currently using Dreamweaver to develop my site.
Is there a different language I should use for this?
php would be easiest.. otherwise this might work for you.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>mailto with location</title>
var subj = encodeURI("Have a look at this:- " + window.location.href);
var body = encodeURI("You might find this interesting:- ") + "%0A%0A" + encodeURI(window.location.href);
document.write("<a href=\"mailto:?subject=" + subj + "&body=" + body + "\">Send link to a friend</a>");
"Problems cannot be solved by the same level of thinking that created them.”
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread