Using a simple script that opens the users e-mail app., than adds the page title to the subject line and a link to the page in the body of the e-mail.
This works great in a current site that I have but now it will not work in a new layout that I am developing. Only places the title of the page in the e-mail subject line with no link reference in the body.
Any thoughts? I do not have the option of creating a server side e-mail form for this client.
Here is the script I am using:
<script type="text/javascript"> function mailpage() { mail_str = "mailto:?subject= " + document.title; mail_str += "&body=Additional information on " + document.title; mail_str += ". You can view it at, " + location.href; location.href = mail_str; } </script>
In the body for the link I place: <a href="javascript:mailpage()"><img src="images/emailimg.gif" width="20" height="16" /> E-mail this Page</a>
I'm attempting to use this code on my site. I am encountering an error message in AOL (which is my default mail program). It says: "The file may not be supported by AOL. AOL will try to open it as a text file if you choose to continue." I then select "yes" to continue. I then get a second error message which says "This file is too large to open sing AOL. Please open the file using another application." This creates an endless loop in AOL.
It will work fine,i have checked it,it worked fine for me. Ok do you want me to give you some another java script for this,even i can wrtie php script for you.