473,720 Members | 2,853 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

session lost when opening new window via javascript

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
6 13001
Gazing into my crystal ball I observed "=?Utf-8?B?VG9ueSBHLg= =?=" <Tony
G.@discussions. microsoft.com> writing in
news:2E******** *************** ***********@mic rosoft.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="javascrip t: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
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 newWindowPaymen t(mypage,myname ,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',w idth='+w+',top= ' +
TopPosition+',l eft='+LeftPosit ion+',scrollbar s='+scroll+',st atus=yes'
win = window.open(myp age,myname,sett ings)
if(win.window.f ocus)
{
win.window.focu s();
}
}

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******** *************** ***********@mic rosoft.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="javascrip t: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
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******** *************** ***********@mic rosoft.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
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******** *************** ***********@mic rosoft.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
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******** *************** ***********@mic rosoft.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******** *************** ***********@mic rosoft.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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6013
by: Nick | last post by:
hi there, When I did the following steps the session in window A lost. 1.) authenticate user in window A and set $_SESSION="joe". 2.) open a new window B by clicking a button (in window A) which calls window.open(..). 3.) I can get the $_SESSION in window B (which is what I want) 4.) When I close window B (manualy or programmaticaly), window A can
4
2289
by: vishal | last post by:
i am running php script which creates session and stores some value in session variables. then this file calls the another php script which displays the values stored in session variables. as far as i have no problem. but after running above steps, i am leaving the explorer open. then i am opening new explorer and running directly the second php script. this script displays the values stored in session variables. should this...
1
7984
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script : VBScript and Javascript Client : 1. IE browser. 2. VBForm embedded with WebBrowser control (MS Internet
2
1808
by: James | last post by:
Session("UserName") is set when someone logs in. Get to a page that displays a record where you can type a comment. The form has an onSubmit event that calls a javascript function. That function sets a javascript variable called beenChecked = true and then calls a PopUp window to spell check the comment. When it's done spell checking, it calls the submit method on the form tag of the opening window. The method evaluates that it's...
2
5008
by: Ashish | last post by:
Hi All, I have a server runnable textbox control. I also have a server side button object but I hook up javascript to it to show a modal dialog. Upon return it places the value in the textbox (client side script). The problem is that after it places the value, postback occurs and value is lost. I have tried overriding SaveViewState and LoadViewState but it doesnt help (for some super cool reason load is called first after postback rather...
1
1670
by: Nauck, Uwe | last post by:
I would like to open, within a session, a new java script popup window. Now I have the problem, that i lost the session in the new popup window. Can you help me, to solve this problem? Thank you.
4
1445
by: Stefan | last post by:
Hello, I am running .NET SQL Session state (V 1.1 blah blah) on a IIS6 server. The problem is that my application spawns a new window via javascript once the user logs in. The user logs in on the main page and the info is stored in a session. However, on some browsers, the act of opening a new window, creates
2
1686
by: DigitalFusion | last post by:
Hello All, I have an app on an intranet which uses the response.contenttype in ASP to create a word doc. The issue I am having is that when this doc is generated and opened, the session is lost. We have tried everything up to this point, setting timeout in IIS, refresh scripts, etc, until we realized it has something to to do with the Word document. I have spent a LOT of time trying to figure this out, or find an answer online. I...
0
9365
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9210
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9126
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7998
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4482
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4748
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3186
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.