...

View Full Version : Popup Name Detect



robindean
02-24-2007, 11:36 PM
I have a script which works as follows ...

function PopUp(url, name, width, height)
{
myWin = window.open (url, name, 'width=' + width + ', height=' + height + ', innerWidth=' + width + ', innerHeight=' + height + ', outerWidth=' + width + ', outerHeight=' + height + ', screenX=0, left=0, screenY=0, top=0, channelmode=0, dependent=0, directories=0, fullscreen=0, location=0, menubar=0, resizable=0, scrollbars=0, status=0, toolbar=0');
}

What I want to do is something like (coded wrong / badly, sorry - note CAPITOLS)

function PopUp(url, NAME, width, height)
{

if NAME = "SOMENAME"
{
MYWINDOWONE = window.open (url, name, 'width=' + width + ', height=' + height + ', innerWidth=' + width + ', innerHeight=' + height + ', outerWidth=' + width + ', outerHeight=' + height + ', screenX=0, left=0, screenY=0, top=0, channelmode=0, dependent=0, directories=0, fullscreen=0, location=0, menubar=0, resizable=0, scrollbars=0, status=0, toolbar=0');
}

else MYWINDOW2 = window.open (url, name, 'width=' + width + ', height=' + height + ', innerWidth=' + width + ', innerHeight=' + height + ', outerWidth=' + width + ', outerHeight=' + height + ', screenX=0, left=0, screenY=0, top=0, channelmode=0, dependent=0, directories=0, fullscreen=0, location=0, menubar=0, resizable=0, scrollbars=0, status=0, toolbar=0');

{

Anybody have a suggestion to how I might go about this?

shyam
02-25-2007, 03:20 PM
did u try finding out the syntax of the if construct?

BarrMan
02-25-2007, 03:51 PM
You'll need to enclose your if statement with parenthesis + for comparisson you'll have to use double "=":

if(statement == true)

btw, next time use the CODE tags.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum