Click to See Complete Forum and Search --> : PopUpWindow


lora_3677
03-25-2003, 11:33 AM
I know you can control the visibility of the toolbar,scrollbar, resize feature, etc from the main html page, however.. is there a way to allow the new window (popup) to control those attributes?
I am in a situation where changes to the main program will overwrite my code, therefore if i add in code to the main html i will have to redo it each time we upgrade. So I would like to have a pop up that controls those things itself.
I would like everything except the titlebar and 'window' hidden.
Please let me know and thanks so much!!:D

Phil Karras
03-25-2003, 01:47 PM
Yes, you use:
var NewWin = window.open(URL, Name, Attributes);

Attributes control everything about the window, size, position, which bars are used, etc.

One problem is that the names and values are different for most the attributes for each of the two major browsers, IE & NS.

I have these listed in a help html file on my test site:

http://cs.yrex.com/

Use the [Help Index] application to search the help files that might help.

Look for "window.open" and it should return all help###.htm files dealing with window.open and in that set should be two or more dealing with these attributes.

lora_3677
03-25-2003, 02:01 PM
Quote Phil Karras:
Yes, you use:
var NewWin = window.open(URL, Name, Attributes);

Attributes control everything about the window, size, position, which bars are used, etc.

One problem is that the names and values are different for most the attributes for each of the two major browsers, IE & NS.



Thanks for your help. I really appreciate it.

The code you gave me needs to be located in the main html page to control the popup, correct? Is there a way to do the same thing (regarding attributes), but actually store the attributes of the new window in the new window's code? I have been trying to figure out if the onLoad function has attributes that could control it....

Or did I totally miss the mark, here?

lora_3677
03-25-2003, 02:02 PM
Originally posted by lora_3677
Quote Phil Karras:
Yes, you use:
var NewWin = window.open(URL, Name, Attributes);

Attributes control everything about the window, size, position, which bars are used, etc.

One problem is that the names and values are different for most the attributes for each of the two major browsers, IE & NS.

Thanks for your help. I really appreciate it.

The code you gave me needs to be located in the main html page to control the popup, correct? Is there a way to do the same thing (regarding attributes), but actually store the attributes of the new window in the new window's code? I have been trying to figure out if the onLoad function has attributes that could control it....

Or did I totally miss the mark, here?

Phil Karras
03-25-2003, 02:15 PM
Take a look at the examples I have on my web site.

I made an HTML/JavaScript file called: help181.htm = Phil's Screen Saver, resize, reposition, change color, Hex #s

which shows how the file itself can change at least colors, sizes, and positions. Since those can be changed inside the file I will assume the others can as well in similar fashion.

lora_3677
03-25-2003, 03:10 PM
hmmmmmmmmmmmmm...... thanks for your help... i can't find another 'window.something' to apply attributes to besides 'open' that will allow the scrollbars to be hidden.... i think i have searched everysite known to man. ha ha.

if you run across anything, let me know. thanks!!:)

Phil Karras
03-26-2003, 01:21 PM
In my example I show how to use:
window.resizeTo(screen.availWidth+10,screen.availHeight+10);
and
window.moveTo(X, Y);

As then stated there should be things like: (for Netscape only)

window.scrollbars.visible = false; // true
window.toolbar.visible = false; // true
window.statusbar.visible = false; // true
window.menubar.visible = false; // true
window.locationbar.visible = false; // true
window.personalbar.visible = false; // true

Now, the only one that doesn't work right away is the scrollbars, the others are instant.

To get the scrollbars to turn on/off you'll have to reload():

location.reload(); // Now scrollbars turn on/off!

These are NOT the same attributes for IE, you'll have to look those up. When you find those you might post them here as well so we have them all for both browsers.

Good-luck.