L
Lisa
Can anyone tell me why the cookie created by this javascript...
<script language=javascript type="text/javascript">
<!--
function SetCookie(username, value, expires, path, domain)
{ document.cookie = username + "=" + escape(value) +
((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
((path == null) ? "" : "; path=" + path) +
((domain == null) ? "" : "; domain=" + domain);
}
var expiration = new Date();
expiration.setTime(expiration.getTime() + 60000);
SetCookie('username', 'Peter', expiration);
// -->
</script>
is not seen by this perl script?
#!/usr/local/bin/perl
use CGI;
$q = new CGI;
print $q->header;
$cookie_in = $q->cookie("username");
if($cookie_in)
{
print $cookie_in;
}
else
{
print "Can't find cookie\n";
}
-Lisa.
<script language=javascript type="text/javascript">
<!--
function SetCookie(username, value, expires, path, domain)
{ document.cookie = username + "=" + escape(value) +
((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
((path == null) ? "" : "; path=" + path) +
((domain == null) ? "" : "; domain=" + domain);
}
var expiration = new Date();
expiration.setTime(expiration.getTime() + 60000);
SetCookie('username', 'Peter', expiration);
// -->
</script>
is not seen by this perl script?
#!/usr/local/bin/perl
use CGI;
$q = new CGI;
print $q->header;
$cookie_in = $q->cookie("username");
if($cookie_in)
{
print $cookie_in;
}
else
{
print "Can't find cookie\n";
}
-Lisa.