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 name= form 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> <b> Have been disconnected you will be redirected to the login page </b> </H2>
<input type="button" value="Return to login" onclick= CloseWindow()>
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.
Bookmarks