JavaScript New Window

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
phppick
Forum Commoner
Posts: 57
Joined: Thu Aug 14, 2003 5:59 am

JavaScript New Window

Post by phppick »

Hi ,

I have a login page to my project, once the user login is successful, i am opening project page in New Window using below javascript code. ( This One I got from this Forum, from Our Friends)

<script language="JavaScript"><!--
msgWindow=window.open('apage.html','windowName','toolbar=no');
//--></script>

But I want to Close login page once the login is successful.. How can i do that??

Can anybody tell where i can find complete code for this.. i am using Php and Mysql along..

Thanks
Straterra
Forum Regular
Posts: 527
Joined: Mon Nov 24, 2003 8:46 am
Location: Indianapolis, Indiana
Contact:

Post by Straterra »

Have it "open" a popup with the same name, but to a site that has this code, and it will close it!

Code: Select all

<script>
var howLong = 1;

t = null;
function closeMe()&#123;
t = setTimeout("self.close()",howLong);
&#125;
</script>
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Your log-in page will have to be in a new window as well because JavaScript won't allow you to close the original browser window.
Post Reply