Only one of my two popups windows is working...

C

cosmo_canuck

Hi folks!

Well, my cut-and-paste-and-fiddle Javascript technique has failed me at
last. I'm working on a site with a pre-existing Javascript which
maximizes the size of the home page and then spawns a centered pop-up
window which contains the actual site. So far, so good. But now they
would like an additional, small pop-up window with a bit of info about
a sale. I'd like that to come up at the upper left, not centered - a
standard popup. But only the main window loads - never the popup.

Here is the site: http://www.boysco.com

I've strunge together the multiple "onload" actions with a semicolon in
the BODY tag but still no luck. Can anyone tell me why my code isn't
doing the job, or suggest a solution?

Thanks muchly,

Adam
 
L

Lee

cosmo_canuck said:
Hi folks!

Well, my cut-and-paste-and-fiddle Javascript technique has failed me at
last. I'm working on a site with a pre-existing Javascript which
maximizes the size of the home page and then spawns a centered pop-up
window which contains the actual site. So far, so good. But now they
would like an additional, small pop-up window with a bit of info about
a sale. I'd like that to come up at the upper left, not centered - a
standard popup. But only the main window loads - never the popup.

Here is the site: http://www.boysco.com

You're trying to load "window.js", which doesn't seem to exist.
 
A

Adam Abrams

Thanks for pointing that out, Lee! Don't know why that .js file went
away, but
I've restored it. Alas, it's a side issue to the problem in my post.

I placed some javascript in the HEAD section that declares a function
called
"popUp", next to the pre-existing code for "openCentredWindow".

The openCenteredWindow function works fine but the other function
doesn't
seem to work - no small, additional popup appears.

I thought I was using the right syntax by simply listing both functions
in the
BODY tag after "onLoad" and separating with a semicolon. But something's
amiss...

Any ideas you have would be much appreciated... thanks!

Adam
 
L

Lee

Adam Abrams said:
Thanks for pointing that out, Lee! Don't know why that .js file went
away, but
I've restored it. Alas, it's a side issue to the problem in my post.

I placed some javascript in the HEAD section that declares a function
called
"popUp", next to the pre-existing code for "openCentredWindow".

The openCenteredWindow function works fine but the other function
doesn't
seem to work - no small, additional popup appears.

I thought I was using the right syntax by simply listing both functions
in the
BODY tag after "onLoad" and separating with a semicolon. But something's
amiss...

They've both got to be contained within the double-quotes.
You've got:

<body
onload="openAllWindows();";popUp('http://www.boysco.com/mailouts/2005_06-pop.html');

That should be:
<body onload="openAllWindows();popUp('http: ...')"

Although, if I was doing it, I would just add the popup code to the
openAllWindows() function and leave the onload attribute the way it was:

function openAllWindows(){
expand();
openCenteredWindow('2005/boysco_2005.html', 'main', 745, 545,
false, false, false, '');
window.open('http://www.boysco.com/mailouts/2005_06-pop.html',
'mailouts',
'resizable,width=250,height=510');
}

You don't need any of that other stuff.
Then, all you've got to do is convince your client that they should
never resize the visitor's window (absolutely never to full screen)
or pop up a new window.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top