Results 1 to 4 of 4

Thread: Problem with close window in PHP

  1. #1
    Join Date
    Nov 2008
    Posts
    159

    Problem with close window in PHP

    I have a little trouble here...

    In fact in my program there is a log using an ID, if the identifier is an administrator identifier then I open another window with the main page with one frame left menu and the right page. So far so good, but I put a button "Logout" to leave the admin mode and return to the login page, but I was not able to close this window ...

    Here is the code that opens the new window:

    PHP Code:
    <script language"=JavaScript"
    function 
    OpenWindow()
    {
    var 
    V
    V=window.open("Frame.html","fullscreen","fullscreen" );
    }
    </
    script
    and in the body called this function

    PHP Code:
    if ($_POST ['identify']=="admin "/* testing if the user is an admin 
    {
    echo 'Your identification as that \admin\well'; 
    echo '<input type="button" value="Continue" onclick="OpenWindow();">'; 

    in the next page (ie frame) at the bottom of the menu I have this button

    PHP Code:
    <form nameform action "Deconnection.php" target="zoneview"
    <
    input type "submit" value "Logout" 
    </form
    and here is the page code Deconnection.php

    PHP Code:
    <script language="JavaScript"
    function 
    CloseWindow() 
    {
    this.close(); 
    }
    </
    script
    </
    head
    <
    body

    <
    H2> <bHave been disconnected you will be redirected to the login page </b> </H2

    <
    input type="button" value="Return to login" onclickCloseWindow()> 
    the concern is that the this.close () does not work. I have to try to this.close () directly into the onclick or self.close () but its not working ..

    so if you have an idea to close this window.

  2. #2
    Join Date
    May 2008
    Posts
    685

    Re: Problem with close window in PHP

    Why don't you use something like:

    Code:
    window. close ();

  3. #3
    Join Date
    Feb 2008
    Posts
    194

    Re: Problem with close window in PHP

    The ideal would be
    PHP Code:
    var V
    V=window.open("Frame.html","fullscreen","fullscreen" ); 
    ... 
    V.close 

    Or, theoretically, the following code should work:
    PHP Code:
    <form method="post"
    <
    input type="button" value="Return to login" onclick="window.close()"
    </
    form

  4. #4
    Join Date
    Nov 2008
    Posts
    159

    Re: Problem with close window in PHP

    I have tried window.close in the onclick, but also in the CloseWindow () it does not work; nothing happens when I clicked

    there is no error ...

    I thought this may be just the fullscreen but it does not work with a "normal" window

Similar Threads

  1. cannot close Logitech Webcam Help window
    By Adisa in forum Windows Software
    Replies: 2
    Last Post: 30-12-2011, 04:48 AM
  2. Unable to close QuickTime 10 window
    By Lyudmyla in forum Windows Software
    Replies: 6
    Last Post: 19-04-2011, 10:13 AM
  3. Close window JavaScript
    By Jensen Ackles in forum Software Development
    Replies: 6
    Last Post: 13-05-2010, 12:16 PM
  4. Need to close All Window
    By Aakarshan.d in forum Operating Systems
    Replies: 4
    Last Post: 12-02-2009, 08:58 AM
  5. HTML code to close window
    By Jacek in forum Software Development
    Replies: 5
    Last Post: 12-01-2009, 11:55 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,942,214.36181 seconds with 16 queries