...

naming a window

cunning-fox
06-24-2002, 12:39 AM
Hi,

I have this javascript code that pops up a new window when pressed. How do I name this window "Login". Here is the code:

<form method="post" action="http://www.mysite/cgi/login.cgi" target="popupWin" onSubmit="javascript:
var w = 140;
var h = 147;
var winFeatures = 'width='+w+',height='+h+',location=yes,scrollable,left=350,top=220,resizable=yes';
var winPtr = window.open('', this.target, winFeatures);
return true;">



Thanks

QuackHead
06-24-2002, 02:51 AM
First of all, re-do your code...

here's what I suggest...


<html>
<head>
<title>test</title>
<script language="JavaScript">
<!--
function openWindow()
{
var w = 140;
var h = 147;
var winFeatures = 'width='+w+',height='+h+',location=yes,scrollbars=yes,
left=350,top=220,resizable=yes';
var winPtr = window.open(this.target, 'Login', winFeatures);
//-->
</script>
</head>
<body>
<form method="post" action="http://www.mysite/cgi/login.cgi" target="popupWin" onSubmit="openWindow(); return true;">
</form>
</body>
</html>


Try that, see if it works - that's how you name a window..

Here is the javascript openwindow function explained.

Variable = window.Open('PAGE_URL', 'PAGE_NAME', 'PAGE_PROPERTIES');

That's it

~Quack



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum