TroelsM
06-05-2004, 05:49 PM
maybe a silly question - but I think I have done this before but cant remember how ?
I have the following script and code in an .asp page
and would like to call the script from the asp code - can I do this
<script>
<!--
function CryptMailto(s) {
var n=0;
var r="";
for(var i=0;i<s.length;i++) {
n=s.charCodeAt(i);
if (n>=8364) {n = 128;}
r += String.fromCharCode(n+(2));
}
return r;
}
// -->
</script>
</head>
<body bgcolor="#FFFFFF">
<%
text = "mailto:"
text = text & "troels@majlandt.dk"
' here I would like to call the CryptMailto function and return then result in the textcrypt - and the below method dosent work
textcrypt = CryptMailto(text)
response.write "<br>text after " & textcrypt
%>
any one know how to do this
I have the following script and code in an .asp page
and would like to call the script from the asp code - can I do this
<script>
<!--
function CryptMailto(s) {
var n=0;
var r="";
for(var i=0;i<s.length;i++) {
n=s.charCodeAt(i);
if (n>=8364) {n = 128;}
r += String.fromCharCode(n+(2));
}
return r;
}
// -->
</script>
</head>
<body bgcolor="#FFFFFF">
<%
text = "mailto:"
text = text & "troels@majlandt.dk"
' here I would like to call the CryptMailto function and return then result in the textcrypt - and the below method dosent work
textcrypt = CryptMailto(text)
response.write "<br>text after " & textcrypt
%>
any one know how to do this