window.close() casuing popup window to hang when closing/opening again and again..

I have a parent window which opens a child window.

the child window has a close button which I placed javascript code "window.close()" to close it.

so i close the child window and re-open it again from the parent window ( around 3 times ). but suddenly my child window hangs... ( browser is up but loading...)

any ideas?


Alvin Shih
Software Developer
MCP MCTS MCPD
0
shihalv
4/10/2007 5:42:21 AM
asp.net.client-side 24353 articles. 2 followers. Follow

3 Replies
2100 Views

Similar Articles

[PageSpeed] 19
Get it on Google Play
Get it on Apple App Store

can u give more detail??? i don't think that child window hanged... there shoud be any other problem. did u write some more javascript in child or parent window??? if yes then send it too...

0
vatsaldesai24
4/10/2007 9:07:45 AM

Looks like the same old memory leak issue with Javascript on browsers.

Check the rest of the code. You can debug your javascript to find why its hanging...Are you working on Javascript DOM by any chance???

cheers

moredotnet


Vishal Khanna
.NET Interviews & FAQs @ www.dotnetUncle.com


Click Mark as Answer if the reply helped you.
0
moredotnet
4/10/2007 9:43:48 AM

Managed to fix the problem by adding "return false;" after the OnClientClick="window.close()" of the popup window when closing.

 So OnClientClick="window.close(); return false;", this prevents from doing a post back when click...

not sure why but it WORKED ;)


Alvin Shih
Software Developer
MCP MCTS MCPD
0
shihalv
4/10/2007 9:48:55 AM
Reply:

Similar Artilces:

Open Popup Window and Close the window that Opened it
I'm using some code that I found on this site to open a Popup window with a Button Click for a Crystal Report: Dim PopUpScript As String = "<script language='javascript'>" + "window.open(" & Chr(39) & strExportFile & Chr(39) & ");</script>" Page.ClientScript.RegisterStartupScript(Me.GetType(), "PopUpWindow", PopUpScript, False) After the Popup Window shows the Report I would like to close the window that opened this popup window.  Thanks, Mark just add window.close(); in Dim PopUpScript As String ...

superreview granted: [Bug 263844] Javascript window.close() on popup not working when popup is opened in tab : [Attachment 162257] set opener on opened windows diverted into tabs
Boris Zbarsky <bzbarsky@mit.edu> has granted Boris Zbarsky <bzbarsky@mit.edu>'s request for superreview: Bug 263844: Javascript window.close() on popup not working when popup is opened in tab https://bugzilla.mozilla.org/show_bug.cgi?id=263844 Attachment 162257: set opener on opened windows diverted into tabs https://bugzilla.mozilla.org/attachment.cgi?id=162257&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> r+sr=bzbarsky. Dan, thanks for doing this! I really wish we could factor some of this code that's being copied f...

window.opener.closed return an permission denied error when opener window is closed.
There are two aspx pages, page1.aspx and page2.aspx.  There is an 'Open' button on page1, click this button, I open an separate browser window from which I open an separate browser window with url being page2.aspx.  Both pages are in same domain.On page2.aspx, every 5 seconds, it calls a javascript function that will check the "Closed" property of opener window. If the opener window is not closed, it return me false, which is correct. BUT if the opener window is closed, I am getting a permission denied Javascript runtime error.I am running the appli...

i want to close popup window when i close main window
dear all, advance thanks...can anybody help me.... i am using VS 2005 web application based on VB. i am using this following code for popup the window.   Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "popup", "window.open('webpopup.aspx?querystring','','scrollbars=yes,menubar=no,height=700,width=1000,resizable=yes,toolbar=no,location=no,status=no')", True) my requirements are 1.whether this code will work in firefox?if no how i want to call this for both IE and firefox 2.when i will close the main window i want to close thi...

superreview requested: [Bug 241972] new window opened by window.open('xxx.exe') or target="_blank" isn't closed automatically when a download begins : [Attachment 225294] close blank window
Marria Nazif <marria@gmail.com> has asked Darin Fisher (Google) <darin@meer.net> for superreview: Bug 241972: new window opened by window.open('xxx.exe') or target="_blank" isn't closed automatically when a download begins https://bugzilla.mozilla.org/show_bug.cgi?id=241972 Attachment 225294: close blank window https://bugzilla.mozilla.org/attachment.cgi?id=225294&action=edit ------- Additional Comments from Marria Nazif <marria@gmail.com> This is a first try at closing the window after the external app handler has done its work. This se...

superreview cancelled: [Bug 241972] new window opened by window.open('xxx.exe') or target="_blank" isn't closed automatically when a download begins : [Attachment 225294] close blank window
Marria Nazif <marria@gmail.com> has cancelled Marria Nazif <marria@gmail.com>'s request for superreview: Bug 241972: new window opened by window.open('xxx.exe') or target="_blank" isn't closed automatically when a download begins https://bugzilla.mozilla.org/show_bug.cgi?id=241972 Attachment 225294: close blank window https://bugzilla.mozilla.org/attachment.cgi?id=225294&action=edit ...

How to close current window when the popup window is open
 hi all,i need to close my current window when the popup is open.now i use data grid and iv call popup window in selected index chage event of that datagrid.but my current window is not close when popup was open.please tell me how i do this.thnks. I guess it depends on how you are opening the popup.  Here's an article that talks about doing this using javascript:http://blogs.x2line.com/al/articles/350.aspx  MarvinIf, by some rare and amazing chance, I suggested a solution that actually worked for you, please mark the post as "ANSWER" because, hey, I don&#...

firefox hangs on main window close if any other windows are open
Hi. I have the following problem. If I close main firefox window when any other firefox windows are open (popups, DownThemAll, Firebug, another Firefox window in non-single- window mode) all those windows become unresponsive, and firefox proccess just sits there eating 100% CPU until I kill it off. The same happens when Firefox tries to merge a full-fledged (non- popup) window into the main one in signle window mode (I use tab mix plus), presumably because it is closing that full window; popups without toolbars and stuff are merged correctly. I'm running 2.0.0.5 on Windows XP P...

Is there a way to close all windows you've opened from your application when the main window is closed?
My main application window opens a few additional windows with javascript. I'd like to close all of them when the main window is closed if they haven't already been closed by the user. Is there a way to do that? Thanks! Hello I handle closing a single window in my apps by declaring a javascript variable that will point to the open window var NewWindow; then set it if (NewWindow!=null)NewWindow.close(); NewWindow=window.open(parameters); set up the windows unload event to a function such as "destroypage" /* ****************************...

superreview requested: [Bug 332901] popup window with js redirect after onbeforeunload and window.close causes the opener window to redirect : [Attachment 217504] Something like this?
Boris Zbarsky <bzbarsky@mit.edu> has asked Darin Fisher (Google) <darin@meer.net> for superreview: Bug 332901: popup window with js redirect after onbeforeunload and window.close causes the opener window to redirect https://bugzilla.mozilla.org/show_bug.cgi?id=332901 Attachment 217504: Something like this? https://bugzilla.mozilla.org/attachment.cgi?id=217504&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> I'd also like to hear what you guys think of this for branch. I'm frankly not sure how safe this change is. :( ...

superreview granted: [Bug 332901] [FIX]popup window with js redirect after onbeforeunload and window.close causes the opener window to redirect : [Attachment 217504] Something like this?
Darin Fisher (Google) <darin@meer.net> has granted Boris Zbarsky <bzbarsky@mit.edu>'s request for superreview: Bug 332901: [FIX]popup window with js redirect after onbeforeunload and window.close causes the opener window to redirect https://bugzilla.mozilla.org/show_bug.cgi?id=332901 Attachment 217504: Something like this? https://bugzilla.mozilla.org/attachment.cgi?id=217504&action=edit ------- Additional Comments from Darin Fisher (Google) <darin@meer.net> >Index: docshell/base/nsDSURIContentListener.cpp > NS_IMETHODIMP > nsDSURIContentListe...

New 3.5.2 version does not have a X to close the last or sole open window, when all older versions had it, I want (need) this X back to close the last window opened.
Name: J.Elderberry Product: Firefox Summary: New 3.5.2 version does not have a X to close the last or sole open window, when all older versions had it, I want (need) this X back to close the last window opened. Comments: When one wants to remove all open web page(s) and keep a empty open Firefox, with nothing open in case one needs it, we now can't do it, we have to keep the last window opened. This is very annoyind to me because in my work, I have the good habit to close every web sites when my consultation of those sites are finished. It's like closing a dictionaty w...

superreview granted: [Bug 348183] scenario where clicking cancel in the "closing window with <n> tabs open" prompt closes the window, instead of keeping it open : [Attachment 233097] alternative, low
Brian Ryner <bryner@gmail.com> has granted Seth Spitzer [:ss] <sspitzer@mozilla.com>'s request for superreview: Bug 348183: scenario where clicking cancel in the "closing window with <n> tabs open" prompt closes the window, instead of keeping it open https://bugzilla.mozilla.org/show_bug.cgi?id=348183 Attachment 233097: alternative, low-risk patch until everything is sorted out https://bugzilla.mozilla.org/attachment.cgi?id=233097&action=edit ...

superreview requested: [Bug 348183] scenario where clicking cancel in the "closing window with <n> tabs open" prompt closes the window, instead of keeing it open : [Attachment 233097] low risk patch u
Seth Spitzer [:ss] <sspitzer@mozilla.com> has asked Brian Ryner <bryner@gmail.com> for superreview: Bug 348183: scenario where clicking cancel in the "closing window with <n> tabs open" prompt closes the window, instead of keeing it open https://bugzilla.mozilla.org/show_bug.cgi?id=348183 Attachment 233097: low risk patch until everything is sorted out https://bugzilla.mozilla.org/attachment.cgi?id=233097&action=edit ------- Additional Comments from Seth Spitzer [:ss] <sspitzer@mozilla.com> I'm still nervous about changing nsGlobalWindow.cp...

Web resources about - window.close() casuing popup window to hang when closing/opening again and again.. - asp.net.client-side

Danica Coto (@danicacoto) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Q&A: Catching up with EDM star Dannic
... and Dyro, and his own massive productions. He was voted number 30 on DJ Mag’s influential Top 100 DJs poll earlier this year, and is casuing ...

Two multiple car crashes in Perth claim the lives of two men
Two men have lost their lives on Perth roads after horror crashes involving multiple cars in Warnbro and Middle Swan on Monday afternoon.

Workers Compensation Claims - Work Cover Claims - Common Law Claim - The Australian Injury Helpline
The Australian Injury Helpline are experts in work causing injuries and have the right experience in dealing with these kinds of cases and ensuring ...

Tree Biology Notes
Elm Leaf Beetle treatments and control

David Cameron tells the Commons he is deeply sorry for what happened on Bloody Sunday
Highlights, not verbatim: We have acted in good faith by publishing the findings of the Saville Inquiry as soon as possible after the election. ...

The 2012 iPod Touch: A Great Pocket Computer For Kids
... in your pocket, its orientation makes no difference. The New USB cable The new Lightning cable, which replaces the old 30-pin dock, is casuing ...


Nelson delayed three hours after more Texas rain
Second-round play at the AT&T Byron Nelson was delayed three hours Friday morning after 4 1/2 inches of overnight rains left an already saturated ...

Repair Sitemeter Error in Internet Explorer
It is being reported that Sitemeter, which monitors site activity, is casuing errors in IE 5,6,&7 according to sources. When a IE user visits ...

Resources last updated: 12/13/2015 12:23:09 AM