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:
and in the body called this functionPHP Code:<script language"=JavaScript">
function OpenWindow()
{
var V;
V=window.open("Frame.html","fullscreen","fullscreen" );
}
</script>
in the next page (ie frame) at the bottom of the menu I have this buttonPHP 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();">';
}
and here is the page code Deconnection.phpPHP Code:<form name= form action = "Deconnection.php" target="zoneview">
<input type = "submit" value = "Logout"
</form>
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 ..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()>
so if you have an idea to close this window.


Reply With Quote

Bookmarks