Here is some script I copied to create a mailto link which grabs the browser URL and inserts it into the subject of the email. Its working perfect but every page I go to a Javascript alert box pops up saying:
mailto:address@address.ca?Subject="WHAT EVER IS IN THE BROWSER ADDRESS BAR"
Im rubbish with JS. How do I get the script to work without the alert pop up or even so with a lifespan?
<script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.js'>
</script>
<script type='text/javascript'>
//<![CDATA[
$(window).load(function(){
var url = "mailto:address@address.ca?Subject=" + window.location;
$('#mailtoLink').attr('href', url);
window.alert($('#mailtoLink').attr('href')); // = url;
});//]]>
</script>
HERE IS A EXAMPLE PAGE: