#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Hellas
    Posts
    46
    Rep Power
    14

    javascript location.href drops session?


    I am getting in a page the $REQUEST_URI and then store it in a $var to use it later using a javascript:

    location.href='$var'

    it's ok about the link, it works, but the $var contains a session which drops after the link.

    If I put a simple href link with $var it's ok. But what I want to achieve is to have an automatic redirect.
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,640
    Rep Power
    4476
    Did you start the session on the page you are redirecting to? Maybe you have to pass the PHPSESSID in the redirect.

    ---John Holmes...
    -- Cigars, whiskey and wild, wild women. --
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Hellas
    Posts
    46
    Rep Power
    14

    Yes


    Yes the session is started, and everything about the session is ok.

    As I wrote before, if I replace the javascript with:

    <a href="$var">click here</a>

    The session does not get dropped after clicking that link and go the $var uri.

IMN logo majestic logo threadwatch logo seochat tools logo