Page 1 of 1

Sessions not being passed to JS pop-ups...

Posted: Thu Jul 07, 2005 12:19 pm
by Burrito
I just finished a calendar application and one of the features is the ability to filter events by the person who scheduled it. That "filter" is done in a pop-up window that is opened by js, they pick the filters they want and and they're added into an array which I set as a session var on the pop-up page. As soon as the filters are set, the pop-up closes and the parent reloads.

works like a peach on my machine BUT one of my users just tried it and something really weird happend. When he opened the pop-up, it asked him to log in again (so the session didn't carry over from the parent to the pop-up)...fine I can live with that. He logged in again, and went to set his filters, as soon as he set the filters, the session var got set, the window closed, and the parent refreshed, but the filters weren't set (obviously the session didnt' carry from the child to the parent either :? .

I could make it set the filters on the parent itself, but I really would like to know why this happens on his machine but not on mine.

I'm using win XP with IE 6. He's on w2k with IE 6.

obviously this has to be a browser setting, but I wouldn't know where to begin to look....?
any ideas/suggestions?

and dont' say use firefox! :twisted:

Posted: Fri Jul 08, 2005 10:50 am
by Burrito
8O ¤Bump Bump¤ 8O

Posted: Fri Jul 08, 2005 1:04 pm
by neophyte
My guess is check your $_SESSION domain settings. If the parent opens in mydomain.com but the child in http://www.mydomain.com you might have trouble there. You can use session_set_cookie_params() to set the domain. Set it to .domain.com (front dot is important). Why it works on your system but not on the web I have no idea. Obviously the settings are sent to some other session and not the parent window's session.

Posted: Fri Jul 08, 2005 2:29 pm
by Burrito
nah, it's all on the same domain.

Code: Select all

var bob = window.open('page.php');
...kind of thing... I checked to make sure he had cookies enabled and indeed he does, any other ideas?

Posted: Fri Jul 08, 2005 2:38 pm
by neophyte
Got no clues. Sorry Burrito. :(

Posted: Fri Jul 08, 2005 3:19 pm
by pickle
I'll assume he's using IE - try setting the security settings really low. Before doing that though, try this page on some other computers. It may either be a fluke that your computer works, or a fluke that his doesn't - knowing that'll help you determine what to test.

Posted: Fri Jul 08, 2005 3:21 pm
by Burrito
I'm assuming a fluke that his doesn't. I have tried on 4 other systems here in the office and hawleyjr even tested it for me yesterday and had success.

I basically turned his security settings off and still same deal...really weird stuff, major disturbance in the force for sure.

Posted: Fri Jul 08, 2005 3:28 pm
by pickle
What happens when you call print_r($_SESSION) from the pop-up window?

Posted: Fri Jul 08, 2005 3:32 pm
by Burrito
don't you mean print_r[$_SESSION]...lmao.

empty array 8O

Posted: Fri Jul 08, 2005 3:48 pm
by dyonak
lol @ burrito =P

Posted: Fri Jul 08, 2005 4:05 pm
by pickle
I know you didn't want to hear this but: Install Firefox on his machine

If it works then it's likely his IE. If it doesn't, it's likely his OS. Win2k might have some funky settings.

If it works everywhere but his computer, then it's likely something on his computer.