By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,137 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

Netscape Browser Resize problem

P: n/a
I'm trying (unsuccessfuly) to resize a browser window in Netscape (v8)
using javascript - There are 2 methods I am trying to use below but
neither works. Any tips?
I only need this for netscape and I need to resize the browser even by
1 pixel.
<SCRIPT language=javascript>
var frameWidth = 0;
var frameHeight = 0;
if (self.innerWidth)
{
frameWidth = self.innerWidth;
frameHeight = self.innerHeight;
}
else if (document.documentElement &&
document.documentElement.clientWidth)
{
frameWidth = document.documentElement.clientWidth;
frameHeight = document.documentElement.clientHeight;

}
else if (document.body)
{
frameWidth = document.body.clientWidth;
frameHeight = document.body.clientHeight;
}
// METHOD 1
parent.window.resizeTo(300,300);

if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
//METHOD 2
window.innerWidth= window.innerWidth - 1.
}
</SCRIPT>

Sep 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
ir*****@yahoo.com wrote:
<SCRIPT language=javascript>
<script type="text/javascript">
// METHOD 1
parent.window.resizeTo(300,300);
Are you resizing this window or its parent? You seem not to be sure:
if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
//METHOD 2
window.innerWidth= window.innerWidth - 1.
}
window.resizeBy( -1, 0 );
</SCRIPT>

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Sep 22 '05 #2

P: n/a
re;window or parent - it's one frame/window so window is fine.

I tried
<SCRIPT language="javascript">
window.resizeBy( -50, -50 );
</SCRIPT>

This worked fine for IE & Firefox

But it does not work in Netscape V8 - I have Netscape V8.0.3.3

Sep 22 '05 #3

P: n/a
ir*****@yahoo.com wrote:
<SCRIPT language="javascript">
window.resizeBy( -50, -50 );
</SCRIPT> This worked fine for IE & Firefox But it does not work in Netscape V8 - I have Netscape V8.0.3.3


Netscape 8 is, by default, configured to disallow resizing of the
browser window. Check the security settings, and consider your NS 8
users (poor souls).

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Sep 22 '05 #4

P: n/a
ir*****@yahoo.com wrote:
I'm trying (unsuccessfuly) to resize a browser window in Netscape (v8)
using javascript - There are 2 methods I am trying to use below but
neither works. Any tips?
Windows resizing by scripts can be disabled through user preferences
in more recent Gecko-based user agents, including Netscape 8.
I only need this for netscape and I need to resize the browser even by
1 pixel.
Don't even bother. Think about the possible consequences in different
environments.
<SCRIPT language=javascript>


Should be

<script type="text/javascript">
PointedEars
Oct 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.