Read the Includes/ASP in Web Templates for the thread on all this stuff.
Using the title tag in this example, we set a cookie to store the IMAIL
output. Then the asp can access the cookie.
Problems: Cookies were at most 4k max in size.
I haven't actually tried the code below, so if someone would like to try it, great! Post a working copy please!
<html>
<head>
<title><!--IMAIL.MailboxFolderSummary--></title>
<script language="javascript">
function replace(instring,replaceword,replacewith)
{
var
text=" " + instring + " ";
apos=
text.indexOf(replaceword);
while
(apos > -1)
{
text=text.substring(1,apos) + replacewith + text.substring(apos+replaceword.length,text.length);
apos=text.indexOf(replaceword);
}
return
text;
}
var adoc;
adoc = replace(document.title,'"',chr(30))
; // Convert
" to chr(30)
// invariably we could also do : adoc=replace("<!---IMAIL.MailboxFolderSummary--->",'"',chr(30))
adoc = replace(adoc,"'",chr(31))
;
// Convert ' to chr(31)
// my replace function won't handle replacing
' to '' without infinite looping.
// my cookie coding techniques are very rusty.
Could someone fix it up!
document.cookie="IMAIL='"
+ adoc + ";EXPIRES=;PATH='jsasp.asp';DOMAIN='mydomain.com'";
</script>
<script language="javascript" src="http://mydomain.com/jsasp.asp">
// The .asp page will grab
the cookie information.
</script>
