Ask Experts Questions for FREE Help !
Ask
    ahamedmohideen's Avatar
    ahamedmohideen Posts: 2, Reputation: 1
    New Member
     
    #1

    Nov 20, 2014, 04:26 AM
    How to close parent window after opening the child window as popup of the same page?
    My requirement is to run the .net web application in full screen with taskbar but without minimize, maximize and close buttons. Please. Look at my below code, it does my requirement but parent window not closing. How do I achieve that?

    if (Convert.ToString(Request.QueryString["Id"]) == "a")
    ScriptManager.RegisterStartupScript(this.Page, GetType(), "Script", "<script language='javascript'>window.opener.close();</script>", false);
    else
    ScriptManager.RegisterStartupScript(this.Page, GetType(), "Script", "<script language='javascript'>NewWin=window.open('Default. aspx?Id=a',null,'width=' + screen.width + ', height=' + screen.height + ', top=0, left=0, resizable=yes,menubar=no,toolbar=no,scrollbars=yes ,location=no,directories=no,status=no');window.ope n('','_self','');</script>", false);
    ahamedmohideen's Avatar
    ahamedmohideen Posts: 2, Reputation: 1
    New Member
     
    #2

    Nov 20, 2014, 04:57 AM
    How to close parent window after opening the child window as popup of the same page?
    My requirement is to run the .net web application in full screen with taskbar but without Menubar, Toolbar and Bookmarks. Please. Look at my below code, it does my requirement but parent window not closing. How do I achieve that?

    if (Convert.ToString(Request.QueryString["Id"]) == "a")
    ScriptManager.RegisterStartupScript(this.Page, GetType(), "Script", "<script language='javascript'>window.opener.close();</script>", false);
    else
    ScriptManager.RegisterStartupScript(this.Page, GetType(), "Script", "<script language='javascript'>NewWin=window.open('Default. aspx?Id=a',null,'width=' + screen.width + ', height=' + screen.height + ', top=0, left=0, resizable=yes,menubar=no,toolbar=no,scrollbars=yes ,location=no,directories=no,status=no');window.ope n('','_self','');</script>", false);

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Close all child windows through parent window [ 1 Answers ]

Hi, all In javascript I need to close all the child windows that I have opened through a parent window Scenario: here i will be having as many as child window opened and name given to the child window can not be tracked because each will be having a different name, and i am using 70...

How to close all the childwindows(popup window) when closing the parent window [ 3 Answers ]

Hi, all In javascript I need to close all the child windows that I have opened through a parent window Scenario: Here I will be having as many as child window opened and name given to the child window can not be tracked because each will be having a different name, and I am using 70 to...

Close all child windows through parent window [ 1 Answers ]

I want answer for the above question asapp

Opening a new page in the same window [ 3 Answers ]

Hi I have a simple problem. The script given below works fine but the problem is that it doesn't open the pages "success.htm" and "failure.htm" depending upon the conditions. The problem is in the script lines given: Document.location.href = "success.htm" Document.location.href = "failure.htm"...


View more questions Search