Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-24-2002, 12:39 AM   PM User | #1
cunning-fox
New Coder

 
Join Date: Jun 2002
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
cunning-fox is an unknown quantity at this point
naming a window

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
cunning-fox is offline   Reply With Quote
Old 06-24-2002, 02:51 AM   PM User | #2
QuackHead
Regular Coder

 
Join Date: Jun 2002
Posts: 344
Thanks: 0
Thanked 0 Times in 0 Posts
QuackHead is an unknown quantity at this point
First of all, re-do your code...

here's what I suggest...

Code:
<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
QuackHead is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:59 AM.


Advertisement
Log in to turn off these ads.