aniwebapp
05-28-2009, 01:33 PM
Hi All,
I am trying to implement a log out feature, which closes the current page and opens a new session. Since the webpage is authenticated, user need to provide the username and password. I have written the following code for it.
The problem is that it is not closing the page but opens the new page with out asking for the username and password. The web page is uploaded on apache server. I tried this code on a test basis. But it is giving a warning before closing. I also want to avoid that also. Can anyone suggest any method to resolve this issue. It would be a great help.
<script language="JavaScript" type="text/javascript">
<!--
function closewindow()
{
var anotherwindow=window.open("http://www.ip.com/ef3.html")
self.opener = this;
self.close() }
//-->
</script>
<a href="JavaScript: closewindow()">Log Out</a>
Scenario
Login to http://www.ip.com/ef3.html
ef3.html has two frames on which one is index.htmland the other one is home.html. i want to add logout feature on index.html upon clicking closes the session and opens ef3.html again.
I am trying to implement a log out feature, which closes the current page and opens a new session. Since the webpage is authenticated, user need to provide the username and password. I have written the following code for it.
The problem is that it is not closing the page but opens the new page with out asking for the username and password. The web page is uploaded on apache server. I tried this code on a test basis. But it is giving a warning before closing. I also want to avoid that also. Can anyone suggest any method to resolve this issue. It would be a great help.
<script language="JavaScript" type="text/javascript">
<!--
function closewindow()
{
var anotherwindow=window.open("http://www.ip.com/ef3.html")
self.opener = this;
self.close() }
//-->
</script>
<a href="JavaScript: closewindow()">Log Out</a>
Scenario
Login to http://www.ip.com/ef3.html
ef3.html has two frames on which one is index.htmland the other one is home.html. i want to add logout feature on index.html upon clicking closes the session and opens ef3.html again.