Sorry for my English...
I am new to JavaScript. I have written short script to create a link
sending e-mail:
<script type="text/javascript">
document.getElementById("MailTo").href =
"mailto:r_ahimsa_m@poczta.onet.pl" +
"?subject=" + document.title + "&" +
"body=" + location.href;
</script>
<a id="MailTo" href="">Send this page via e-mail...</a><br/>
I don't know why the script is not called (thus solution doesn't
work). I have tried to place the script in <head> section. Doesn't
work either.
Please help me.
The problem is by the time you are trying to find the hyperlink element it
doesn't exist (it hasn't been rendered by the browser yet). Just move the
script anywhere after the <a> tag (for example at the end of your page) and
it will work.
-Raul
> Sorry for my English...
>
[quoted text clipped - 13 lines]
> work either.
> Please help me.
Ma³y Piotruœ - 12 Nov 2005 17:21 GMT
>The problem is by the time you are trying to find the hyperlink element it
>doesn't exist (it hasn't been rendered by the browser yet). Just move the
>script anywhere after the <a> tag (for example at the end of your page) and
>it will work.
>
>-Raul
Thank you very much.