So You Want To Open A Window, Huh?

By Joe Burns

I can always tell when there is a new command that is in vogue. I start getting all kinds of email asking how to do it. Well, this is the new thing. I don't know why, but everyone wants to know how to create these little windows that pop up. All the Geocities pages have them. Other pages use them as control panels operating the main window.

If you decide to go with this kind of pop up window, use it sparingly. I think they become an annoyance after a while. Sort of like some guy telling you the same joke every time he meets you. It's fun about three times. Then you start yelling at the screen. I do at least. It really scares the cat.

But if you insist on doing one. Let's do it right! We'll start at the beginning.



--------------------------------------------------------------------------------


The Basic JavaScript Format

Oh yes! This is done through JavaScript. But it's a very simple JavaScript, so don't get worried so soon. Here's the basic format.



Heck, you can almost guess what each of the parts does. Since this is a script, you need the opening SCRIPT LANGUAGE="javascript" statement, and of course the /SCRIPT statement at the end. The are used to hide the text from older browsers that don't read JavaScript. You see, if you didn't have those in there, the text would display. This way it doesn't.
...but it's the stuff in the middle that that makes the magic.

window.open ('page.html') does just what it says. It opens a window (a new browser screen actually) and fills it with the page within the parentheses and single quotes. In the example above the HTML document that fills the window is called page.html.

Is that it?

Technically yes. That little script will work and open a new browser window and you'll get the effect. But wouldn't it be great if we actually had the ability to configure the window any way we wanted? You bet. Here's how.


Configuring The Window
Now we get to the commands I used on this page to get the little window effect. This is exactly what I have:


--------------------------------------------------------------------------------





(Get all on one line...no spaces)

SOMEONE IS LISTENING

SOMEONE IS LISTENING
Express yourself

YOU ARE NOT ALONE

YOU ARE NOT ALONE
Who is watching you?