Click to See Complete Forum and Search --> : Need help on java, still learning


Tasmanian Devil
04-28-2003, 01:14 PM
I am still very much new to Java, but can someone pleae help me out? Have a thge following script except that after login button is pressed, I need a new window open to the users full screen and the page they just came from to close. Can someone help?

<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function Login(){
var done=0;
var username=document.login.username.value;
username=username.toLowerCase();
if (username=="member1") { window.location="page1.html"; done=1; }
if (done==0) { alert("Invalid login!"); }
}
</SCRIPT>

<BODY>
<center>
<form name=login>
<table width=225 border=0 cellpadding=0>
<tr><td colspan=2><center><font size="+2"></center></td></tr>
<tr><td>Username:</td><td><input type=text name=username></td></tr>
<input type=button value="Login!" onClick="Login()"></td></tr>
</table>
</form>

Thanks Tasmanian :confused:

khalidali63
04-28-2003, 02:19 PM
Here take a look at this link...
http://68.145.35.86/skills/javascripts/WindowOpenFullScreen.html

EDIT:
NOTE:

Clicking on the link above will close this window.and open a new window,taking up full screen of your monitor.

havik
04-28-2003, 02:25 PM
Replace:
window.location="page1.html"; done=1;

with:
window.open('http:\/\/www.yahoo.com','','resizeable=yes, scrollbars=yes, width='+screen.width+',height='+screen.height+',left=0,top=0');window.close(); done=1;

and just edit the attributes as needed.

Havik