Olaf wrote on 09 aug 2004 in comp.lang.javascript
:
I have a ASP page that after saveing data to the database it will
write the following script code to the page:
<script>
document.location='mailto:or@mailadr.se?body=http://myWebserver/page.as
p?docID=17&login=HAL&subject=report'; </script>
This all looks well but when I se the actual mail the &login=LAS part
of the link in the body is not there! The subject is correct! It all
looks ok apart from the missing part of the links querystring.
I tried to use Server.UrlEncode but that just left the body of the
mail compleatly empty.
How would the last two "&"s know which "?" they have to follow?
In other words:
the mail body could contain:
http://myWebserver/page.asp?docID=17
and the mail login:
HAL
and the mail subject:
report
but there is no mail login, so where has HAL to go?.
Again in other words: you cannot do that.
Moreover the "mailto'-protocol is not clearly defined over different mail
clients.
===========================
If you really want to get somewhere try this:
document.location=
'mailto:or@mailadr.se?body=http://myWebserver.se/docID17.HAL.report.xyz'
and when the recipient wants to connect your customized 404.asp page will
detect .xyz and redirect this nonexisting URL to where it should be
(page.asp) and have docID17, HAL and report in session variables.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)