Forum Moderators: open
A friend of mine has written a program and has done the help in HTML. I said that it would look better if when the help index file opened that the address bar and buttons were not visible in the browser window. I know you can do it because I've seen it done before but unfortunately can't remember where.
I'm using Dreamweaver 3 is there a quick way to do it in that or does it have to be written into the code. Also will it work across browsers and not just on IE?
Thank in advance, Andy.
Put this in your document head, replacing the XX with the desired pixel sizes of the new window, and putting yes or no in place of each *:
<!--
function Start(page) {
OpenWin = this.open(page, "CtrlWindow", "height=XX, width=XX, toolbar=*, menubar=*, location=*, scrollbars=*, resizable=*");
}
// -->
Then for the ink you want to pop open the new window, use this:
<a href="javascript:Start('http://URL of help file')">
If you don't hand the open() method any string at all, all the new window's features will be set to their individual default values.
However, if you pass an empty features string, the browser opens a window with all features turned off.
If you use the parameters string to set even one value, then
all the other features are turned off -- you do not need to explicitly say =no or =0
A second important point is make very sure to not include any spaces or line breaks inside this features parameter string. Netscape will choke.
Here's a tutorial about window features that's pretty thorough:
[webreference.com...]
The link takes you to page 4 of a thirteen page tutorial about working with windows.
Now, please excuse me while I climb on my soapbox for a minute ;) In many situations it is a useful courtesy to give a new window a status bar. When a new window sits blank for a while, the visitor gets antsy (the old rule of give them something to see in a maximum of 8 seconds).
When you include a status bar, your visitors can see if things are hanging or just slow to render. Without the status bar, you will lose them more often -- the X that closes the new window is an easy target and most people are quick on trigger.