in reply to Re: javascript.. perl.. cookie
in thread javascript.. perl.. cookie

are you saying you were able to get the perl script to read the javascript cookie? -Lisa

Replies are listed 'Best First'.
Re: Re: Re: javascript.. perl.. cookie
by antirice (Priest) on Nov 01, 2003 at 01:15 UTC

    Yes, I was able to get the perl script to read the javascript cookie. However, the path had to be set when the perl script and the html page didn't have the same path. If you don't specify the path when the cookie is set by javascript, the current path is used. Since you didn't set it (SetCookie takes up to five params yet you only provide three, the fourth would be the path) it uses the current path. If the path of the perl script isn't below said path, the browser will not send the cookie.

    For illustrative purposes:

    These work: HTML at: http://www.blah.com/page.html Perl script at: http://www.blah.com/cookie.pl HTML at: http://www.blah.com/page.html Perl script at: http://www.blah.com/cgi-bin/cookie.pl This doesn't work: HTML at: http://www.blah.com/content/page.html Perl script at: http://www.blah.com/cookie.pl

    Of course if the perl script is generating the html content, the cookie should be picked up the next time you visit the script.

    Hope this helps.

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1

      Thanx... helps a lot.. i'll give it a try. I did open the cookie and changed the path, then saved the cookie, but to no avail.. guess it's a cookie thing. woof. Lisa.