Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: close window


Message #1 by philip.moh@a... on Tue, 21 Aug 2001 11:57:21 +0800
Hi,



Anyone know how to close the window? Example, my default page consist of 3

link. When user click on the link, the new window will be open. At the same

time, I want my default page to be closed automatically, without any message

to prompt me for confirmation. I used the window.close() in the open new

window routine but it will prompt me for confirmation. Please help..



Thanks

Phil





Message #2 by "Gerhard Wentink" <data@w...> on Tue, 21 Aug 2001 09:19:37 +0200
This question is coming up once in a time. If it is possible to close the

window that the user opened without a warning, why should you want to. The

user opened a window to browse to your website. If the website tries to

close that window it is (IMHO) good practice to warn him/her. So he can

decide if she wants the window kept open or not.



Regards



Gerhard Wentink

----- Original Message -----

From: <philip.moh@a...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Tuesday, August 21, 2001 5:57 AM

Subject: [asp_web_howto] close window





> Hi,

>

> Anyone know how to close the window? Example, my default page consist of 3

> link. When user click on the link, the new window will be open. At the

same

> time, I want my default page to be closed automatically, without any

message

> to prompt me for confirmation. I used the window.close() in the open new

> window routine but it will prompt me for confirmation. Please help..

>

> Thanks

> Phil

Message #3 by "Craig Flannigan" <ckf@k...> on Tue, 21 Aug 2001 09:52:45 +0100
This code closes the window and has never prompted me when closing...



<a href="JavaScript:parent.window.close()">Close</a>





Regards,

Craig.





-----Original Message-----

From: philip.moh@a... [mailto:philip.moh@a...]

Sent: Tuesday 21 August 2001 04:57

To: ASP Web HowTo

Subject: [asp_web_howto] close window





Hi,



Anyone know how to close the window? Example, my default page consist of 3

link. When user click on the link, the new window will be open. At the same

time, I want my default page to be closed automatically, without any message

to prompt me for confirmation. I used the window.close() in the open new

window routine but it will prompt me for confirmation. Please help..



Thanks

Phil

Message #4 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 21 Aug 2001 10:25:41 +0100
I've said the same thing many times on these lists... I suspect that the

reason you want to open a new window for the link is that you want to hide

toolbars etc for your application.  Once they have finished using your

application, if they want to continue surfing, they can't do it in that

window, so they need to close it and go back to the original window.  If the

original window is gone, then they have to go back to the desktop and click

on the browser icon again, wait for their home page to load again etc, which

means they have to wait rather than immediately type in the next URL which

they could do if the original window was still open.



You cannot assume that people will want the original window closed just

because your application runs in a new window.



-----Original Message-----

From: Gerhard Wentink [mailto:data@w...]

Sent: 21 August 2001 08:20

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





This question is coming up once in a time. If it is possible to close the

window that the user opened without a warning, why should you want to. The

user opened a window to browse to your website. If the website tries to

close that window it is (IMHO) good practice to warn him/her. So he can

decide if she wants the window kept open or not.



Regards



Gerhard Wentink

----- Original Message -----

From: <philip.moh@a...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Tuesday, August 21, 2001 5:57 AM

Subject: [asp_web_howto] close window





> Hi,

>

> Anyone know how to close the window? Example, my default page consist of 3

> link. When user click on the link, the new window will be open. At the

same

> time, I want my default page to be closed automatically, without any

message

> to prompt me for confirmation. I used the window.close() in the open new

> window routine but it will prompt me for confirmation. Please help..

>

> Thanks

> Phil

Message #5 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 21 Aug 2001 10:26:35 +0100
it does in IE, if you try and close the original browser window.  Any child

windows can be closed without the prompt.



-----Original Message-----

From: Craig Flannigan [mailto:ckf@k...]

Sent: 21 August 2001 09:53

To: ASP Web HowTo

Subject: [asp_web_howto] RE: close window





This code closes the window and has never prompted me when closing...



<a href="JavaScript:parent.window.close()">Close</a>





Regards,

Craig.





-----Original Message-----

From: philip.moh@a... [mailto:philip.moh@a...]

Sent: Tuesday 21 August 2001 04:57

To: ASP Web HowTo

Subject: [asp_web_howto] close window





Hi,



Anyone know how to close the window? Example, my default page consist of 3

link. When user click on the link, the new window will be open. At the same

time, I want my default page to be closed automatically, without any message

to prompt me for confirmation. I used the window.close() in the open new

window routine but it will prompt me for confirmation. Please help..



Thanks

Phil

Message #6 by "Craig Flannigan" <ckf@k...> on Tue, 21 Aug 2001 10:34:45 +0100
In my instance I do want users to close a window without being prompted.



Our Intranet offers a Help window throughout the site, and browsing in the

help window is not allowed as it's far smaller, has no toolbars or the

address bar.



If the user has closed their main intranet window, then this is their choice

and they will have to re-open it. Intranets should be almost instant so the

no-prompting is a better method for us.









-----Original Message-----

From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

Sent: Tuesday 21 August 2001 10:26

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





I've said the same thing many times on these lists... I suspect that the

reason you want to open a new window for the link is that you want to hide

toolbars etc for your application.  Once they have finished using your

application, if they want to continue surfing, they can't do it in that

window, so they need to close it and go back to the original window.  If the

original window is gone, then they have to go back to the desktop and click

on the browser icon again, wait for their home page to load again etc, which

means they have to wait rather than immediately type in the next URL which

they could do if the original window was still open.



You cannot assume that people will want the original window closed just

because your application runs in a new window.



-----Original Message-----

From: Gerhard Wentink [mailto:data@w...]

Sent: 21 August 2001 08:20

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





This question is coming up once in a time. If it is possible to close the

window that the user opened without a warning, why should you want to. The

user opened a window to browse to your website. If the website tries to

close that window it is (IMHO) good practice to warn him/her. So he can

decide if she wants the window kept open or not.



Regards



Gerhard Wentink



Message #7 by "Craig Flannigan" <ckf@k...> on Tue, 21 Aug 2001 10:35:29 +0100
No it doesn't.



We only use IE, and no browser's here prompt at all.







-----Original Message-----

From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

Sent: Tuesday 21 August 2001 10:27

To: ASP Web HowTo

Subject: [asp_web_howto] RE: close window





it does in IE, if you try and close the original browser window.  Any child

windows can be closed without the prompt.



-----Original Message-----

From: Craig Flannigan [mailto:ckf@k...]

Sent: 21 August 2001 09:53

To: ASP Web HowTo

Subject: [asp_web_howto] RE: close window





This code closes the window and has never prompted me when closing...



<a href="JavaScript:parent.window.close()">Close</a>





Regards,

Craig.



Message #8 by philip.moh@a... on Tue, 21 Aug 2001 17:40:37 +0800
I have to close the default page because of the cache issue. I don't have to

warn them because the default page must be closed.





	-----Original Message-----

	From:	Gerhard Wentink [SMTP:data@w...]

	Sent:	Tuesday, August 21, 2001 3:20 PM

	To:	ASP Web HowTo

	Subject:	[asp_web_howto] Re: close window



	This question is coming up once in a time. If it is possible to

close the

	window that the user opened without a warning, why should you want

to. The

	user opened a window to browse to your website. If the website tries

to

	close that window it is (IMHO) good practice to warn him/her. So he

can

	decide if she wants the window kept open or not.



	Regards



	Gerhard Wentink

	----- Original Message -----

	From: <philip.moh@a...>

	To: "ASP Web HowTo" <asp_web_howto@p...>

	Sent: Tuesday, August 21, 2001 5:57 AM

	Subject: [asp_web_howto] close window





	> Hi,

	>

	> Anyone know how to close the window? Example, my default page

consist of 3

	> link. When user click on the link, the new window will be open. At

the

	same

	> time, I want my default page to be closed automatically, without

any

	message

	> to prompt me for confirmation. I used the window.close() in the

open new

	> window routine but it will prompt me for confirmation. Please

help..

	>

	> Thanks

	> Phil



Message #9 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 21 Aug 2001 10:50:13 +0100
Because of what cache issue?



-----Original Message-----

From: philip.moh@a... [mailto:philip.moh@a...]

Sent: 21 August 2001 10:41

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





I have to close the default page because of the cache issue. I don't have 

to warn them because the default page must be closed.





-----Original Message-----

From:	Gerhard Wentink [SMTP:data@w...]

Sent:	Tuesday, August 21, 2001 3:20 PM

To:	ASP Web HowTo

Subject:[asp_web_howto] Re: close window



This question is coming up once in a time. If it is possible to

close the window that the user opened without a warning, why should you 

want to. The user opened a window to browse to your website. If the 

website tries to close that window it is (IMHO) good practice to warn 

him/her. So he can decide if she wants the window kept open or not.



Regards



Gerhard Wentink



Message #10 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 21 Aug 2001 10:53:37 +0100
I don't follow you...



You said "If the user has closed their main intranet window, then this is

their choice", meaning that they've closed the window manually, in which

case there is no prompt... the prompt appears when you try to close the main

window with window.close() or self.close(), which you wouldn't be doing if

you want their main window to remain open?



-----Original Message-----

From: Craig Flannigan [mailto:ckf@k...]

Sent: 21 August 2001 10:35

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





In my instance I do want users to close a window without being prompted.



Our Intranet offers a Help window throughout the site, and browsing in the

help window is not allowed as it's far smaller, has no toolbars or the

address bar.



If the user has closed their main intranet window, then this is their choice

and they will have to re-open it. Intranets should be almost instant so the

no-prompting is a better method for us.









-----Original Message-----

From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

Sent: Tuesday 21 August 2001 10:26

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





I've said the same thing many times on these lists... I suspect that the

reason you want to open a new window for the link is that you want to hide

toolbars etc for your application.  Once they have finished using your

application, if they want to continue surfing, they can't do it in that

window, so they need to close it and go back to the original window.  If the

original window is gone, then they have to go back to the desktop and click

on the browser icon again, wait for their home page to load again etc, which

means they have to wait rather than immediately type in the next URL which

they could do if the original window was still open.



You cannot assume that people will want the original window closed just

because your application runs in a new window.



-----Original Message-----

From: Gerhard Wentink [mailto:data@w...]

Sent: 21 August 2001 08:20

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





This question is coming up once in a time. If it is possible to close the

window that the user opened without a warning, why should you want to. The

user opened a window to browse to your website. If the website tries to

close that window it is (IMHO) good practice to warn him/her. So he can

decide if she wants the window kept open or not.



Regards



Gerhard Wentink

Message #11 by philip.moh@a... on Tue, 21 Aug 2001 17:54:32 +0800
I agree what you said but due to the cache issue, I have no choice. 

My default page consists of three links. User click any link and new window

will be opened. They need to login (password and user id) and do the rest of

the job. When done, the will close the newly opened window and return to the

default page. User may login click on the same link to login again but using

different password and user id. The problem if even he/she login as other

user account, he/she will see the previous user information! I wrote to the

vendor and they said it is because of the cache/session. The only way is to

close all the browser and re-open it again so that the user will not see

other's information! Can anyone help me?? I also don't want to close the

default page but no choice. 



	-----Original Message-----

	From:	Alex Shiell, ITS, EC, SE [SMTP:alex.shiell@s...]

	Sent:	Tuesday, August 21, 2001 5:26 PM

	To:	ASP Web HowTo

	Subject:	[asp_web_howto] Re: close window



	I've said the same thing many times on these lists... I suspect that

the

	reason you want to open a new window for the link is that you want

to hide

	toolbars etc for your application.  Once they have finished using

your

	application, if they want to continue surfing, they can't do it in

that

	window, so they need to close it and go back to the original window.

If the

	original window is gone, then they have to go back to the desktop

and click

	on the browser icon again, wait for their home page to load again

etc, which

	means they have to wait rather than immediately type in the next URL

which

	they could do if the original window was still open.



	You cannot assume that people will want the original window closed

just

	because your application runs in a new window.



	-----Original Message-----

	From: Gerhard Wentink [mailto:data@w...]

	Sent: 21 August 2001 08:20

	To: ASP Web HowTo

	Subject: [asp_web_howto] Re: close window





	This question is coming up once in a time. If it is possible to

close the

	window that the user opened without a warning, why should you want

to. The

	user opened a window to browse to your website. If the website tries

to

	close that window it is (IMHO) good practice to warn him/her. So he

can

	decide if she wants the window kept open or not.



	Regards



	Gerhard Wentink

	----- Original Message -----

	From: <philip.moh@a...>

	To: "ASP Web HowTo" <asp_web_howto@p...>

	Sent: Tuesday, August 21, 2001 5:57 AM

	Subject: [asp_web_howto] close window





	> Hi,

	>

	> Anyone know how to close the window? Example, my default page

consist of 3

	> link. When user click on the link, the new window will be open. At

the

	same

	> time, I want my default page to be closed automatically, without

any

	message

	> to prompt me for confirmation. I used the window.close() in the

open new

	> window routine but it will prompt me for confirmation. Please

help..

	>

	> Thanks

	> Phil

Message #12 by philip.moh@a... on Tue, 21 Aug 2001 17:56:46 +0800
Same. It will prompt me for confirmation if I move this into the routine to

open the new window. Example:



Function newWin(){

         Window.open("http://www.hotmail.com", "newWindow");

         Javascript:parent.window.close();

}



Please help.





-----Original Message-----

From:	Craig Flannigan [SMTP:ckf@k...]

Sent:	Tuesday, August 21, 2001 4:53 PM

To:	ASP Web HowTo

Subject:[asp_web_howto] RE: close window



This code closes the window and has never prompted me when closing ...



	<a href="JavaScript:parent.window.close()">Close</a>





Regards,

Craig.





-----Original Message-----

From: philip.moh@a... [mailto:philip.moh@a...]

Sent: Tuesday 21 August 2001 04:57

To: ASP Web HowTo

Subject: [asp_web_howto] close window





Hi,



Anyone know how to close the window? Example, my default page

consist of 3

link. When user click on the link, the new window will be open. At

the same time, I want my default page to be closed automatically, without 

any message to prompt me for confirmation. I used the window.close() in 

the open new window routine but it will prompt me for confirmation. Please 

help..



Thanks

Phil



Message #13 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 21 Aug 2001 11:10:39 +0100
you don't have to close the window to end the session.  Call Session.abandon

to kill the current session in the ASP that does the logon.



-----Original Message-----

From: philip.moh@a... [mailto:philip.moh@a...]

Sent: 21 August 2001 10:55

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





I agree what you said but due to the cache issue, I have no choice. 

My default page consists of three links. User click any link and new window

will be opened. They need to login (password and user id) and do the rest of

the job. When done, the will close the newly opened window and return to the

default page. User may login click on the same link to login again but using

different password and user id. The problem if even he/she login as other

user account, he/she will see the previous user information! I wrote to the

vendor and they said it is because of the cache/session. The only way is to

close all the browser and re-open it again so that the user will not see

other's information! Can anyone help me?? I also don't want to close the

default page but no choice. 



-----Original Message-----

From:	Alex Shiell, ITS, EC, SE [SMTP:alex.shiell@s...]

Sent:	Tuesday, August 21, 2001 5:26 PM

To:	ASP Web HowTo

Subject:[asp_web_howto] Re: close window



I've said the same thing many times on these lists... I suspect that

the reason you want to open a new window for the link is that you want

to hide toolbars etc for your application.  Once they have finished using

your application, if they want to continue surfing, they can't do it in

that window, so they need to close it and go back to the original window.

If the original window is gone, then they have to go back to the desktop

and click on the browser icon again, wait for their home page to load again

etc, which means they have to wait rather than immediately type in the 

next URL which they could do if the original window was still open.



You cannot assume that people will want the original window closed just

because your application runs in a new window.



-----Original Message-----

From: Gerhard Wentink [mailto:data@w...]

Sent: 21 August 2001 08:20

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





This question is coming up once in a time. If it is possible to

close the

window that the user opened without a warning, why should you want

to. The user opened a window to browse to your website. If the website 

tries to close that window it is (IMHO) good practice to warn him/her. So 

he can decide if she wants the window kept open or not.



Regards



Gerhard Wentink



----- Original Message -----

From: <philip.moh@a...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Tuesday, August 21, 2001 5:57 AM

Subject: [asp_web_howto] close window





> Hi,

>

> Anyone know how to close the window? Example, my default page consist of 

> 3 link. When user click on the link, the new window will be open. At

> the same time, I want my default page to be closed automatically, without

> any message to prompt me for confirmation. I used the window.close() in 

> the open new window routine but it will prompt me for confirmation. 

> Please help..

>

> Thanks

> Phil



Message #14 by "TomMallard" <mallard@s...> on Tue, 21 Aug 2001 05:54:45 -0700
FYI, this depends on the security settings of the browser...are yours

configured for "low" security, or "medium"?



tom mallard

seattle

----- Original Message -----

From: "Craig Flannigan" <ckf@k...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Tuesday, August 21, 2001 2:35 AM

Subject: [asp_web_howto] RE: close window





> No it doesn't.

>

> We only use IE, and no browser's here prompt at all.

>

>

>

> -----Original Message-----

> From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

> Sent: Tuesday 21 August 2001 10:27

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: close window

>

>

> it does in IE, if you try and close the original browser window.  Any

child

> windows can be closed without the prompt.

>

> -----Original Message-----

> From: Craig Flannigan [mailto:ckf@k...]

> Sent: 21 August 2001 09:53

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: close window

>

>

> This code closes the window and has never prompted me when closing...

>

> <a href="JavaScript:parent.window.close()">Close</a>

>

>

> Regards,

> Craig.

Message #15 by "Craig Flannigan" <ckf@k...> on Tue, 21 Aug 2001 14:35:29 +0100
medium.

All of our 400 clients are set this way.



-----Original Message-----

From: TomMallard [mailto:mallard@s...]

Sent: Tuesday 21 August 2001 13:55

To: ASP Web HowTo

Subject: [asp_web_howto] RE: close window





FYI, this depends on the security settings of the browser...are yours

configured for "low" security, or "medium"?



tom mallard

seattle

----- Original Message -----

From: "Craig Flannigan" <ckf@k...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Tuesday, August 21, 2001 2:35 AM

Subject: [asp_web_howto] RE: close window





> No it doesn't.

>

> We only use IE, and no browser's here prompt at all.

>

>

>

> -----Original Message-----

> From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

> Sent: Tuesday 21 August 2001 10:27

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: close window

>

>

> it does in IE, if you try and close the original browser window.  Any

child

> windows can be closed without the prompt.

>

> -----Original Message-----

> From: Craig Flannigan [mailto:ckf@k...]

> Sent: 21 August 2001 09:53

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: close window

>

>

> This code closes the window and has never prompted me when closing...

>

> <a href="JavaScript:parent.window.close()">Close</a>

>

>

> Regards,

> Craig.

Message #16 by "mail@a... on Tue, 21 Aug 2001 21:42:36 +0800
It depends. If you open the window with Javascript, you can always close 

it no matter the security settings.



IS_



-----Original Message-----

From: "Craig Flannigan" <ckf@k...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Date: Tue, 21 Aug 2001 14:35:29 +0100

Subject: [asp_web_howto] RE: close window



> medium.

> All of our 400 clients are set this way.

> 

> -----Original Message-----

> From: TomMallard [mailto:mallard@s...]

> Sent: Tuesday 21 August 2001 13:55

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: close window

> 

> 

> FYI, this depends on the security settings of the browser...are yours

> configured for "low" security, or "medium"?

> 

> tom mallard

> seattle

> ----- Original Message -----

> From: "Craig Flannigan" <ckf@k...>

> To: "ASP Web HowTo" <asp_web_howto@p...>

> Sent: Tuesday, August 21, 2001 2:35 AM

> Subject: [asp_web_howto] RE: close window

> 

> 

> > No it doesn't.

> >

> > We only use IE, and no browser's here prompt at all.

> >

> >

> >

> > -----Original Message-----

> > From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

> > Sent: Tuesday 21 August 2001 10:27

> > To: ASP Web HowTo

> > Subject: [asp_web_howto] RE: close window

> >

> >

> > it does in IE, if you try and close the original browser window.  Any

> child

> > windows can be closed without the prompt.

> >

> > -----Original Message-----

> > From: Craig Flannigan [mailto:ckf@k...]

> > Sent: 21 August 2001 09:53

> > To: ASP Web HowTo

> > Subject: [asp_web_howto] RE: close window

> >

> >

> > This code closes the window and has never prompted me when closing...

> >

> > <a href="JavaScript:parent.window.close()">Close</a>

> >

> >

> > Regards,

> > Craig.

Message #17 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 21 Aug 2001 15:36:00 +0100
yes exactly - if you open a window with script then it is a child window and

so there is no prompt when you close it with script.  You only get the

prompt if you attempt to close the main, original window that the user

opened.



-----Original Message-----

From: mail@a... [mailto:mail@a...]

Sent: 21 August 2001 14:43

To: ASP Web HowTo

Subject: [asp_web_howto] RE: close window





It depends. If you open the window with Javascript, you can always close 

it no matter the security settings.



IS_



-----Original Message-----

From: "Craig Flannigan" <ckf@k...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Date: Tue, 21 Aug 2001 14:35:29 +0100

Subject: [asp_web_howto] RE: close window



> medium.

> All of our 400 clients are set this way.

> 

> -----Original Message-----

> From: TomMallard [mailto:mallard@s...]

> Sent: Tuesday 21 August 2001 13:55

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: close window

> 

> 

> FYI, this depends on the security settings of the browser...are yours

> configured for "low" security, or "medium"?

> 

> tom mallard

> seattle

> ----- Original Message -----

> From: "Craig Flannigan" <ckf@k...>

> To: "ASP Web HowTo" <asp_web_howto@p...>

> Sent: Tuesday, August 21, 2001 2:35 AM

> Subject: [asp_web_howto] RE: close window

> 

> 

> > No it doesn't.

> >

> > We only use IE, and no browser's here prompt at all.

> >

> >

> >

> > -----Original Message-----

> > From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

> > Sent: Tuesday 21 August 2001 10:27

> > To: ASP Web HowTo

> > Subject: [asp_web_howto] RE: close window

> >

> >

> > it does in IE, if you try and close the original browser window.  Any

> child

> > windows can be closed without the prompt.

> >

> > -----Original Message-----

> > From: Craig Flannigan [mailto:ckf@k...]

> > Sent: 21 August 2001 09:53

> > To: ASP Web HowTo

> > Subject: [asp_web_howto] RE: close window

> >

> >

> > This code closes the window and has never prompted me when closing...

> >

> > <a href="JavaScript:parent.window.close()">Close</a>

> >

> >

> > Regards,

> > Craig.

Message #18 by philip.moh@a... on Wed, 22 Aug 2001 14:25:20 +0800
But where should I put this command - session.abando? I have so many pages

and user will close the browser anytime



-----Original Message-----

From:	Alex Shiell, ITS, EC, SE [SMTP:alex.shiell@s...]

Sent:	Tuesday, August 21, 2001 6:11 PM

To:	ASP Web HowTo

Subject:[asp_web_howto] Re: close window



you don't have to close the window to end the session.  Call

Session.abandon

to kill the current session in the ASP that does the logon.



-----Original Message-----

From: philip.moh@a... [mailto:philip.moh@a...]

Sent: 21 August 2001 10:55

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





I agree what you said but due to the cache issue, I have no choice. 

My default page consists of three links. User click any link and new

window

will be opened. They need to login (password and user id) and do the

rest of

the job. When done, the will close the newly opened window and

return to the

default page. User may login click on the same link to login again

but using

different password and user id. The problem if even he/she login as

other

user account, he/she will see the previous user information! I wrote

to the

vendor and they said it is because of the cache/session. The only

way is to

close all the browser and re-open it again so that the user will not

see

other's information! Can anyone help me?? I also don't want to close

the

default page but no choice. 



-----Original Message-----

From:	Alex Shiell, ITS, EC, SE [SMTP:alex.shiell@s...]

Sent:	Tuesday, August 21, 2001 5:26 PM

To:	ASP Web HowTo

Subject:[asp_web_howto] Re: close window



I've said the same thing many times on these lists... I suspect that

the reason you want to open a new window for the link is that you

want

to hide toolbars etc for your application.  Once they have finished

using

your application, if they want to continue surfing, they can't do it

in

that window, so they need to close it and go back to the original

window.

If the original window is gone, then they have to go back to the

desktop

and click on the browser icon again, wait for their home page to

load again

etc, which means they have to wait rather than immediately type in

the 

next URL which they could do if the original window was still open.



You cannot assume that people will want the original window closed

just

because your application runs in a new window.



-----Original Message-----

From: Gerhard Wentink [mailto:data@w...]

Sent: 21 August 2001 08:20

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





This question is coming up once in a time. If it is possible to

close the

window that the user opened without a warning, why should you want

to. The user opened a window to browse to your website. If the

website 

tries to close that window it is (IMHO) good practice to warn

him/her. So 

he can decide if she wants the window kept open or not.



Regards



Gerhard Wentink



----- Original Message -----

From: <philip.moh@a...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Tuesday, August 21, 2001 5:57 AM

Subject: [asp_web_howto] close window





> Hi,

>

> Anyone know how to close the window? Example, my default page

consist of 

> 3 link. When user click on the link, the new window will be open.

At

> the same time, I want my default page to be closed automatically,

without

> any message to prompt me for confirmation. I used the

window.close() in 

> the open new window routine but it will prompt me for

confirmation. 

> Please help..

>

> Thanks

> Phil

Message #19 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 22 Aug 2001 10:46:19 +0100
in each page of your application



<BODY ONBEFOREUNLOAD="window.opener.location.href='logout.asp'">



then in the logout ASP call session.abandon and then redirect back to the

home page





-----Original Message-----

From: philip.moh@a... [mailto:philip.moh@a...]

Sent: 22 August 2001 07:25

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





But where should I put this command - session.abando? I have so many pages

and user will close the browser anytime



-----Original Message-----

From:	Alex Shiell, ITS, EC, SE [SMTP:alex.shiell@s...]

Sent:	Tuesday, August 21, 2001 6:11 PM

To:	ASP Web HowTo

Subject:[asp_web_howto] Re: close window



you don't have to close the window to end the session.  Call

Session.abandon

to kill the current session in the ASP that does the logon.



-----Original Message-----

From: philip.moh@a... [mailto:philip.moh@a...]

Sent: 21 August 2001 10:55

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





I agree what you said but due to the cache issue, I have no choice. 

My default page consists of three links. User click any link and new

window

will be opened. They need to login (password and user id) and do the

rest of

the job. When done, the will close the newly opened window and

return to the

default page. User may login click on the same link to login again

but using

different password and user id. The problem if even he/she login as

other

user account, he/she will see the previous user information! I wrote

to the

vendor and they said it is because of the cache/session. The only

way is to

close all the browser and re-open it again so that the user will not

see

other's information! Can anyone help me?? I also don't want to close

the

default page but no choice. 



-----Original Message-----

From:	Alex Shiell, ITS, EC, SE [SMTP:alex.shiell@s...]

Sent:	Tuesday, August 21, 2001 5:26 PM

To:	ASP Web HowTo

Subject:[asp_web_howto] Re: close window



I've said the same thing many times on these lists... I suspect that

the reason you want to open a new window for the link is that you

want

to hide toolbars etc for your application.  Once they have finished

using

your application, if they want to continue surfing, they can't do it

in

that window, so they need to close it and go back to the original

window.

If the original window is gone, then they have to go back to the

desktop

and click on the browser icon again, wait for their home page to

load again

etc, which means they have to wait rather than immediately type in

the 

next URL which they could do if the original window was still open.



You cannot assume that people will want the original window closed

just

because your application runs in a new window.



-----Original Message-----

From: Gerhard Wentink [mailto:data@w...]

Sent: 21 August 2001 08:20

To: ASP Web HowTo

Subject: [asp_web_howto] Re: close window





This question is coming up once in a time. If it is possible to

close the

window that the user opened without a warning, why should you want

to. The user opened a window to browse to your website. If the

website 

tries to close that window it is (IMHO) good practice to warn

him/her. So 

he can decide if she wants the window kept open or not.



Regards



Gerhard Wentink



----- Original Message -----

From: <philip.moh@a...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Tuesday, August 21, 2001 5:57 AM

Subject: [asp_web_howto] close window





> Hi,

>

> Anyone know how to close the window? Example, my default page

consist of 

> 3 link. When user click on the link, the new window will be open.

At

> the same time, I want my default page to be closed automatically,

without

> any message to prompt me for confirmation. I used the

window.close() in 

> the open new window routine but it will prompt me for

confirmation. 

> Please help..

>

> Thanks

> Phil


  Return to Index