Hi Bryan,
Not that I spend much time with Cookies, but I'm pretty sure that Cookies
are only assigned relative to Domain and directory names - not specific
filenames.
Cookies are afterall just HTTP Header information so they are available to
all application files for a given Domain, regardless of what file type
assigned the Cookie. So if you know the name of a specific ASP assigned
Cookie then you should be able to retrieve the value via Witango, with
something like:
<@VAR cookie$anASPCookie>
If the previous ASP developer was doing something funky with the ASP
filename, then yes you can also retrieve cookies via JavaScript. Following
is piece of client-side JavaScript to pull back the Tango_UserReference
cookie value (a.k.a. The User Session unique key).
<script>
function GetCookie(sName){
if(sName == 'all'){
return document.cookie;
}else{
// cookies are separated by semicolons
var aCookie = document.cookie.split("; ");
for(var i=0; i < aCookie.length; i++){
// a name/value pair (a crumb) is separated by an equal sign
var aCrumb = aCookie[i].split("=");
if(sName == aCrumb[0]){
return unescape(aCrumb[1]);
}
}
// a cookie with the requested name does not exist
return null;
}
}
alert(GetCookie('Tango_UserReference'));
</script>
Note: GetCookie('all'); will return all the cookies available.
Hope this helps. Cheers....
----- Original Message -----
From: "Bryan Hughes" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 9:56 AM
Subject: Witango-Talk: Reading ASP Cookies...
> I'm redeveloping the site in Witango that was originally done in ASP.
>
> Unfortunately the client informs me that he has a great amount of user
> information stored in ASP generated cookies on user's browsers and this
> information _CAN_NOT_ be lost.
>
> Is there a way for me to read this information stored in the ASP
> cookies by Witango. I'm thinking, no, because index.asp will be a
> different page than index.taf.
>
> Anybody have any ideas on how to convert or retrieve this information.
>
> Is storing browser cookies in Javascript the best possible solution for
> portability?
>
> The client is willing to scrap Witango if this cannot be done, so I'm
> trying to do my best to keep Witango in the game.
>
> Please help!
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> with unsubscribe witango-talk in the message body
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body