[thelist] mailto with complete subject and message body

Stuart Young syoung at unitec.ac.nz
Mon May 17 18:35:18 CDT 2004


----------------------
One of my clients wants to have on the article pages a link that will 
open the viewers mail client with the subject and message body allready

filled (and the to: left blank):
----------------------

I use this dog of a JavaScript to accomplish this. I presume that this
JavaScript is out of date and badly written.

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function isPPC() {
if (navigator.appVersion.indexOf("PPC") != -1) return true;
else return false;
}
if(isPPC()) {
document.write('<b>Send <A CLASS="contact" HREF=\"mailto:\?subject\=Hi,
Take a look at this new DESCRIPTION webpage I found, ' + document.title
+ '?body=You can see this page at: ' + window.location + '\"
onMouseOver="window.status=\'Send your friends e-mail about this page\';
return true" TITLE="Send your friends e-mail about this page">this
page<\/A> to a friend.</b> Or mention us in online forums and
newsgroups.');
}
else { document.write('<b>Send <A CLASS="contact"
HREF=\"mailto:\?body\=Hi, Take a look at this new DESCRIPTION webpage I
found, ' + document.title + '. MORE DESCRIPTION. You can see this page
at: ' + window.location + '\" onMouseOver="window.status=\'Send your
friends e-mail about this page\'; return true" TITLE="Send your friends
e-mail about this page">this page<\/A> to a friend.</b> Or mention us in
online forums and newsgroups.');
}
//  End -->
</script>

Dr Stuart Young,       +64 (0)9-815 4321 Ex 8656
<syoung at unitec.ac.nz>     
Lecturer, School of Computing and Information Technology,
Unitec New Zealand, Auckland, New Zealand
http://hyperdisc.unitec.ac.nz/staff/syoung.htm
I would provide a URL for my official staffpage, but its too long and
complex


More information about the thelist mailing list