Javascript To Resize Window?

F

Fleemo

Is there any way to have a browser window resize itself when
displaying a new HTML page? I'm using the javascript below to open a
NEW window at a certain size, but I'd prefer the page to load in the
same window, just sized differently. Here's the script I'm currently
using:

<a href="#" onClick="MyWindow=window.open('THE_DOC.html','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=575,height=805,left=20,top=20');
return false;">

Any input appreciated.
 
D

DU

Fleemo said:
Is there any way to have a browser window resize itself when
displaying a new HTML page?

Not anymore because many browsers now have user setting prefs that can
disallow scripters from doing that for secondary windows. For windows
not opened by javascript, you need enhanced security privileges.

I'm using the javascript below to open a
NEW window at a certain size, but I'd prefer the page to load in the
same window, just sized differently.

No you can not do that without enhanced security privileges.

Here's the script I'm currently
using:

<a href="#" onClick="MyWindow=window.open('THE_DOC.html','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=575,height=805,left=20,top=20');
return false;">

The requested window dimensions plus window toolbars and os-dependent
semi-permanent applications like windows taskbar will exceed the height
of the available workspace for application so the popup will never have
the requested height in a majority of cases (for users with 800x600 and
1024x768 scr. res.)
Any input appreciated.


DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top