|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to close multiple web pagesHi:
Show quoteHide quote > I need some help achieving the following: > I have an ASP.net app and this app allows to open several web pages with a > target ="_blank" on its own ie window. > > I want to close all the prior windows open on a click event of a button on > my main page. > > Thanks > Nancy. AFAIK you can' for pages opened this way. The browser will issue a warning
to ask the permission to the user (the rule is that a script is not able to close a window opened by the user without asking for permission, it can close only windows opened using scripting). So what should work would be to open those windows uisng window.open that returns a reference to the opened window (and you'll be able to close using this reference). It's perhaps likely better also to try to keep the opened window to a minimum (youc ould perhaops use tabs or whatever could fit your navigation need). -- "greatdane" <greatd***@discussions.microsoft.com> a écrit dans le message de news: F07FBBBD-F02B-4575-A77A-21BBB8EBA***@microsoft.com...Show quoteHide quote > Hi: >> I need some help achieving the following: >> I have an ASP.net app and this app allows to open several web pages with >> a >> target ="_blank" on its own ie window. >> >> I want to close all the prior windows open on a click event of a button >> on >> my main page. >> >> Thanks >> Nancy. > > Thanks for responding. I am using the <asp:hyperlink ... to open my *.aspx
pages. Do I have to change the way I open the pages? Show quoteHide quote "Patrice" wrote: > AFAIK you can' for pages opened this way. The browser will issue a warning > to ask the permission to the user (the rule is that a script is not able to > close a window opened by the user without asking for permission, it can > close only windows opened using scripting). > > So what should work would be to open those windows uisng window.open that > returns a reference to the opened window (and you'll be able to close using > this reference). > > It's perhaps likely better also to try to keep the opened window to a > minimum (youc ould perhaops use tabs or whatever could fit your navigation > need). > -- > > "greatdane" <greatd***@discussions.microsoft.com> a écrit dans le message de > news: F07FBBBD-F02B-4575-A77A-21BBB8EBA***@microsoft.com... > > Hi: > >> I need some help achieving the following: > >> I have an ASP.net app and this app allows to open several web pages with > >> a > >> target ="_blank" on its own ie window. > >> > >> I want to close all the prior windows open on a click event of a button > >> on > >> my main page. > >> > >> Thanks > >> Nancy. > > > > > > > AFAIK yes, you'll have to use window.open client side (that is if you want
to get rid of the confirmation dialog). See : http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp To close the window you'll use anyway window.close : (http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/close_0.asp). "Invoking the window.close method on a window not opened with script displays a confirmation dialog box. Using script to close the last running instance of Microsoft Internet Explorer also opens the confirmation dialog box. " -- Patrice "greatdane" <greatd***@discussions.microsoft.com> a écrit dans le message de news: 1B22EC82-F475-4B7A-B6C0-E65D9D3EF***@microsoft.com...Show quoteHide quote > Thanks for responding. I am using the <asp:hyperlink ... to open my > *.aspx > pages. > Do I have to change the way I open the pages? > > > "Patrice" wrote: > >> AFAIK you can' for pages opened this way. The browser will issue a >> warning >> to ask the permission to the user (the rule is that a script is not able >> to >> close a window opened by the user without asking for permission, it can >> close only windows opened using scripting). >> >> So what should work would be to open those windows uisng window.open that >> returns a reference to the opened window (and you'll be able to close >> using >> this reference). >> >> It's perhaps likely better also to try to keep the opened window to a >> minimum (youc ould perhaops use tabs or whatever could fit your >> navigation >> need). >> -- >> >> "greatdane" <greatd***@discussions.microsoft.com> a écrit dans le message >> de >> news: F07FBBBD-F02B-4575-A77A-21BBB8EBA***@microsoft.com... >> > Hi: >> >> I need some help achieving the following: >> >> I have an ASP.net app and this app allows to open several web pages >> >> with >> >> a >> >> target ="_blank" on its own ie window. >> >> >> >> I want to close all the prior windows open on a click event of a >> >> button >> >> on >> >> my main page. >> >> >> >> Thanks >> >> Nancy. >> > >> > >> >> >>
No open/save prompt
How to get GridView row from DataKey? Wizard.FinishButtonClick - launch browser AND redirect Return Values from Popup to UserControl Drop Down List issue Item has already been added. Key in dictionary can't remove listitem from ddl in loop data field - change true/false to Yes/No asp.net 2.0 site menu control (from navigation block) and IE 5 compatibility Parameter as web user control |
|||||||||||||||||||||||