By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,092 Members | 1,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,092 IT Pros & Developers. It's quick & easy.

session lost when opening new window via javascript

P: n/a
Hi there,

I have an APS 3 application, running on a Windows 2003 Web edition server -
it is a very busy website, and when users are click on certain links
(membership info), a new window i opened via javascript.

This new window is on the SAME website as where the user is located, but
just opened in HTTPS (secure) mode - the user can now examine memberhip terms
and continue to buy membership.

And this works fine, and hundreds of times each day this page i opened and
used - but sometimes when a user opens this page, his session is lost ?!!?

On all links (in javascript) that opens this window, I have embedded the
current user ID in the URL string (as debug), and every single time the
window opens, an active a user ID is present - so when they click on the
link, they have a user ID - but when the window is opened, sometimes the
session is lost.

Any idea why this happens ? I have debugged and debugged to see if there is
any pattern, but sadly there isn't ...

Can anyone help me, please ?
Regards,
Tony Fonager

Denmark
Jul 22 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Gazing into my crystal ball I observed "=?Utf-8?B?VG9ueSBHLg==?=" <Tony
G.@discussions.microsoft.com> writing in
news:2E**********************************@microsof t.com:
Hi there,

I have an APS 3 application, running on a Windows 2003 Web edition
server - it is a very busy website, and when users are click on certain
links (membership info), a new window i opened via javascript.

This new window is on the SAME website as where the user is located,
but just opened in HTTPS (secure) mode - the user can now examine
memberhip terms and continue to buy membership.

And this works fine, and hundreds of times each day this page i opened
and used - but sometimes when a user opens this page, his session is
lost ?!!?

On all links (in javascript) that opens this window, I have embedded
the current user ID in the URL string (as debug), and every single time
the window opens, an active a user ID is present - so when they click
on the link, they have a user ID - but when the window is opened,
sometimes the session is lost.

Any idea why this happens ? I have debugged and debugged to see if
there is any pattern, but sadly there isn't ...

Can anyone help me, please ?


I would suspect something to do with javascript. Have you tested it with
javascript turned off? Are you sure that the javascript is working on all
modern browsers? You might run into problems if you're doing something like
<a href="javascript:function()"> because javascript is not a valid URI
scheme, and some browsers, Opera for example, will not recognize it.
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #2

P: n/a
Thanks for the answer!

I am pretty sure that it has NOTHING to do with the javascript open window
command, for several reasons. The only thing the javascript does, is to open
a new window - and this window IS actually being opened, in the cases where I
have problems, as my debugging begins AFTER the window has been opened and
loaded ...

If javascript is turned off, the window would not open at all, right ?

This is the javascript function :

var win = null;
function newWindowPayment(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top=' +
TopPosition+',left='+LeftPosition+',scrollbars='+s croll+',status=yes'
win = window.open(mypage,myname,settings)
if(win.window.focus)
{
win.window.focus();
}
}

My debugging tells me that it happens on very moderns browsers as well, that
is IE 6 and so forth ...
Regards,
Tony

"Adrienne" wrote:
Gazing into my crystal ball I observed "=?Utf-8?B?VG9ueSBHLg==?=" <Tony
G.@discussions.microsoft.com> writing in
news:2E**********************************@microsof t.com:
Hi there,

I have an APS 3 application, running on a Windows 2003 Web edition
server - it is a very busy website, and when users are click on certain
links (membership info), a new window i opened via javascript.

This new window is on the SAME website as where the user is located,
but just opened in HTTPS (secure) mode - the user can now examine
memberhip terms and continue to buy membership.

And this works fine, and hundreds of times each day this page i opened
and used - but sometimes when a user opens this page, his session is
lost ?!!?

On all links (in javascript) that opens this window, I have embedded
the current user ID in the URL string (as debug), and every single time
the window opens, an active a user ID is present - so when they click
on the link, they have a user ID - but when the window is opened,
sometimes the session is lost.

Any idea why this happens ? I have debugged and debugged to see if
there is any pattern, but sadly there isn't ...

Can anyone help me, please ?


I would suspect something to do with javascript. Have you tested it with
javascript turned off? Are you sure that the javascript is working on all
modern browsers? You might run into problems if you're doing something like
<a href="javascript:function()"> because javascript is not a valid URI
scheme, and some browsers, Opera for example, will not recognize it.
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jul 22 '05 #3

P: n/a
As far as I recall it's *normal* to lose session state when switching
from http to https, since the browser sees these as different domains.

possible solution for you here:
http://groups-beta.google.com/group/...1a5dcea55782d8

Tim.
"Tony G." <Tony G.@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
Hi there,

I have an APS 3 application, running on a Windows 2003 Web edition
server -
it is a very busy website, and when users are click on certain links
(membership info), a new window i opened via javascript.

This new window is on the SAME website as where the user is located,
but
just opened in HTTPS (secure) mode - the user can now examine
memberhip terms
and continue to buy membership.

And this works fine, and hundreds of times each day this page i
opened and
used - but sometimes when a user opens this page, his session is
lost ?!!?

On all links (in javascript) that opens this window, I have embedded
the
current user ID in the URL string (as debug), and every single time
the
window opens, an active a user ID is present - so when they click on
the
link, they have a user ID - but when the window is opened, sometimes
the
session is lost.

Any idea why this happens ? I have debugged and debugged to see if
there is
any pattern, but sadly there isn't ...

Can anyone help me, please ?
Regards,
Tony Fonager

Denmark

Jul 22 '05 #4

P: n/a
But if session is lost when changing from HTTP to HTTPS, this would happen
for all users, right ?

But it doesn't ... this only happens for 1%, maybe ... the rest 99% KEEPS
their session state, and continues buying their membership ... so this is a
bit strange ...

Regards,
Tony

"Tim Williams" wrote:
As far as I recall it's *normal* to lose session state when switching
from http to https, since the browser sees these as different domains.

possible solution for you here:
http://groups-beta.google.com/group/...1a5dcea55782d8

Tim.
"Tony G." <Tony G.@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
Hi there,

I have an APS 3 application, running on a Windows 2003 Web edition
server -
it is a very busy website, and when users are click on certain links
(membership info), a new window i opened via javascript.

This new window is on the SAME website as where the user is located,
but
just opened in HTTPS (secure) mode - the user can now examine
memberhip terms
and continue to buy membership.

And this works fine, and hundreds of times each day this page i
opened and
used - but sometimes when a user opens this page, his session is
lost ?!!?

On all links (in javascript) that opens this window, I have embedded
the
current user ID in the URL string (as debug), and every single time
the
window opens, an active a user ID is present - so when they click on
the
link, they have a user ID - but when the window is opened, sometimes
the
session is lost.

Any idea why this happens ? I have debugged and debugged to see if
there is
any pattern, but sadly there isn't ...

Can anyone help me, please ?
Regards,
Tony Fonager

Denmark


Jul 22 '05 #5

P: n/a
It could be a browser security setting or a "bug fix" in a browser version.
In the past, you could switch from http to https if the pages were in the
same virtual directory. I haven't tested this in a long time.

If could also be the generic "lost session in new browser window" (not
related to HTTP/HTTPS transition). See
here:http://www.aspfaq.com/show.asp?id=2172

Have you tried going to the HTTPS page in your main browser window instead
of a popup?

Our application depends heavily on sessions being available in popup windows
and we have not had any problems reported since IE4. However, if you are
experiencing enough problems to cause concern then you will probably be
better off using transfering data between your pages using a database or
hidden form fields.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Tony G." <Tony G.@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
But if session is lost when changing from HTTP to HTTPS, this would happen
for all users, right ?

But it doesn't ... this only happens for 1%, maybe ... the rest 99% KEEPS
their session state, and continues buying their membership ... so this is a bit strange ...

Regards,
Tony

"Tim Williams" wrote:
As far as I recall it's *normal* to lose session state when switching
from http to https, since the browser sees these as different domains.

possible solution for you here:
http://groups-beta.google.com/group/...1a5dcea55782d8
Tim.
"Tony G." <Tony G.@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
Hi there,

I have an APS 3 application, running on a Windows 2003 Web edition
server -
it is a very busy website, and when users are click on certain links
(membership info), a new window i opened via javascript.

This new window is on the SAME website as where the user is located,
but
just opened in HTTPS (secure) mode - the user can now examine
memberhip terms
and continue to buy membership.

And this works fine, and hundreds of times each day this page i
opened and
used - but sometimes when a user opens this page, his session is
lost ?!!?

On all links (in javascript) that opens this window, I have embedded
the
current user ID in the URL string (as debug), and every single time
the
window opens, an active a user ID is present - so when they click on
the
link, they have a user ID - but when the window is opened, sometimes
the
session is lost.

Any idea why this happens ? I have debugged and debugged to see if
there is
any pattern, but sadly there isn't ...

Can anyone help me, please ?
Regards,
Tony Fonager

Denmark


Jul 22 '05 #6

P: n/a
That link was VERY interesting - I think I will try not relying on same
sessions being used, and recode the system.

Thanks alot!!

-
Regards,
TOny

"Mark Schupp" wrote:
It could be a browser security setting or a "bug fix" in a browser version.
In the past, you could switch from http to https if the pages were in the
same virtual directory. I haven't tested this in a long time.

If could also be the generic "lost session in new browser window" (not
related to HTTP/HTTPS transition). See
here:http://www.aspfaq.com/show.asp?id=2172

Have you tried going to the HTTPS page in your main browser window instead
of a popup?

Our application depends heavily on sessions being available in popup windows
and we have not had any problems reported since IE4. However, if you are
experiencing enough problems to cause concern then you will probably be
better off using transfering data between your pages using a database or
hidden form fields.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.