The JS button is used to call this function, to open a new window.
View the source of this document.
The function WinOpen() creates a new window by calling the method open.
The first quotes contain the URL of the page, where you can put the address of a HTML
document that you want to load. If you leave it blank (indicated as ""), no page is loaded and you can
write to it using JavaScript. The next quotes specify the name of the window.
Here you can write nearly anything- this has no effect on our examples right now.
However, you will get an error message if you write "Display Window"
(with a space between the two words).
The next quotes specify the properties of the window.
You can tell if you want a toolbar,scrollbars, etc.
If you write toolbar=yes then you will get a toolbar in your window.
There are some different properties listed below which you can change.
You can specify every possible property, but you must write them the way shown above.
Such as, resizable=no, and with no spaces between!
Here is what you can change on your page:
toolbar
location
directories
status
menubar
scrollbars
resizable
copyhistory
width in pixels
height in pixels
For pixels, you write the number of pixels, to specify to
the browser how large your window should be.
After you have opened your window and called it msg (stands in front of the open- method),
you can now write to your window. Here you can write normal HTML code.
This is really a great thing. You could build a HTML document using the form input a user gave
you in the document before. You could make a page where a user has to write his name to a form
and then a new HTML- document is created containing his name!
Please note this: When writing something to a window you should always put a break after the last
text you write to a window.
Otherwise you probably don't get to see the last row of your text.
This happens because the browser only writes out complete lines - and
if there is no end of the line it waits for more to come.
Another important thing is this: If you want to insert any images into a new window be sure
to include the height and width properties within the image tag.
And as always, check the pages on as many different browsers, versions, and platforms as practical.