Forum Moderators: open
I have this in a page:
<a href="javascript:mailpage()">Send details of this page to a friend<span style="text-decoration: none">
</span></a>
<script language="JavaScript" type="text/javascript" src="sendtofriends.js">
</script
**and in the sendtofriends.js file is this:
<!-- hide script from old browsers
function mailpage()
{
mail_str = "mailto:?subject=" + document.title;
mail_str += "&body=Hi,%0D%0A%0D%0AJust came across this webpage and thought you might like to see it.%0D%0A%0D%0A" + document.title;
mail_str += ".%0D%0A%0D%0A" + location.href;
location.href = mail_str;
}
// end hiding script from old browsers -->
But the problem is that whenever anyone clicks on it, the gif images on the page stop moving - is there a known conflict between javascript and gif's please?
Any help would be much appreciated.
Sev.
Secondly, there is no point obfuscating the "mailto:" at the beginning.
However, to answer your question, the gif animation may terminate as a result of the attempt to change location.
You could try location.replace(mail_str); but I'm less than confident this will work.
Kaled.