• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session in Pop up window ?

 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

I want to ask is it posible to pass a session from a page to a pop up window ?? I try it and it does not work ?!


thanx in advance.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume you mean, does a popup window operate under the same session (pass the same session cookie value) as it's opener.

Yes.

When you say you tried it, what did you do? What were the results that you saw. What was different from your expected results?
 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ben,

i set an atribute in the sesstion and click on a button that opens the pop up window, i prnt the sesstion id when the page loads and the Id's where deff. , maybe i did something wrong !!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have heard (but don't know the details of) a bug in MSIE that causes this.
Someone else may be able to elaborate.
 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi again,

thanx for your replay, can I know what exactly id you mean by "pass the same session cookie value" ? is it the same way of setting an atribute and submit the form then in the next page we get the atribute from that sesstion ?!!!
 
Jeffrey Spaulding
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i set an atribute in the sesstion and click on a button
[/QB]


The HTML behind the button plus the code where you set the value would be
a great help here.

Do you have cookies enabled in the machine in question?

Do you do URL rewriting when filling the popup?

Do sessions work for pages other than this pop up?

J.
 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have cookies enabled in the machine in question?


yes coockies enabled.

Do you do URL rewriting when filling the popup?


no i dont i just open a new window.

Do sessions work for pages other than this pop up?


yes it did.
 
Sharad Agarwal
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeffrey Spaulding:
The HTML behind the button plus the code where you set the value would be a great help here.


moh sak - perhaps if you posted these, we could help you better.
 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is what i'm doing :

-----input type=button Click="doTest()"

------
script
------

func doTest(){
win...open("test");
}

sorry i could not add the original code because the site says that it contains some evil script or something !!!

as you can see i try to redirect the page into another one and get the sesstion from that page and the result was : the ID is the same one in the parent window, but when i open another window a new session will be created.

any ideas ???!
 
Sharad Agarwal
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The javascript looks good. Can we now look at the server side code which accesses the session?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried this on other browsers? That would help narrow down whether it's something in your code or environemnt, vs an IE-ism.
[ July 12, 2005: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A quick google search with "session bug window.open" brought this up:
http://support.microsoft.com/kb/q196383/



[BPS update]
Argg.. Posted it too soon:
This is probably not applicable (unless you're using a REALLY old version of MSIE).

APPLIES TO
�Microsoft Internet Explorer 4.0 128-Bit Edition
�Microsoft Internet Explorer 4.01 Service Pack 2
�Microsoft Internet Explorer 4.01 Service Pack 1

[ July 12, 2005: Message edited by: Ben Souther ]
 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

thanx for your help

Have you tried this on other browsers?

in fact I didn't, but when I read the article in the microsoft help and support site that Ben include in his post it seams its a bug in the IE .
Is that mean that there is no way to solve it programaticly ??

thanx again.
[ July 13, 2005: Message edited by: moh sak ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I later pointed out. It's a bug in older versions of IE.
You're not using MSIE 4x, are you?

If so, or if you plan to support versions going back that far, you may need to re-think the way you build your app and not put session dependent pages in pop-ups.

There will be quite a few client side (Javascript) tricks and techniques you will have to steer clear of too.
 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

thanx for your help i'll try to solve the problem , i think i'll cancle the pop up windows at all !!

thanx again
 
Sharad Agarwal
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
moh sak - What you are trying to do is very standard and should work. I would hate to mess with usability for convenient development in this case. Maybe you are doing something on the server side that is invalidating the session.

Originally posted by Sharad Agarwal:
The javascript looks good. Can we now look at the server side code which accesses the session?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would also be helpful to know what browser and version you are using.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sharad Agarwal:
moh sak - What you are trying to do is very standard and should work. I would hate to mess with usability for convenient development in this case. Maybe you are doing something on the server side that is invalidating the session.


Usability is often sacrificed in lieu of broad browser support.
If he needs to support those versions that have that bug, not relying on sessions in popup windows may be a necessary trade off.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic