PWB and window.resizeTo()

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

Post Reply
GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

PWB and window.resizeTo()

Post by GregP »

Has anyone experimented with the javascript function "window.resizeTo()" in PWB?

I've written a page using this script and it works perfectly in IE, but when I use it in PWB it resizes the windows 'contents' but not the window itself, leaving large parts of the screen with empty white space.

I had just about everything in this window turned off (title bar, status bar, menus, toolbar, shellbar...) but turned it all back on to test and no difference... :(

Any help appreciated,
Greg

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

What version of PWB are you using?

Would you mind sharing your script so we can test it as well?

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

I'm using PWB v2.04, IE6 and WinNT 4 SP6.

The script is :

<HTML>
<HEAD>
<TITLE>Timer</TITLE>

<script language="JavaScript">
<!--
var Led = new Array(10);

for (var i=0; i < Led.length; i++) {
Led[i] = new Image();
Led[i].src = "led" + i + ".gif";
}

function SetLED(num) {
var firstDig = Math.floor(num/100);
var secondDig = Math.floor((num-firstDig*100)/10);
var thirdDig = num-(firstDig*100)-(secondDig*10);

document.led1.src = Led[firstDig].src;
document.led2.src = Led[secondDig].src;
document.led3.src = Led[thirdDig].src;
}

var gCount = 120;

function CountDown() {
gCount--;
SetLED(gCount);

if (gCount > 0)
window.setTimeout("CountDown()",1000);
if (gCount == 0) {
top.opener=null;
top.close();
}
}

function Start() {
SetLED(gCount);
CountDown();
}

function ShrinkLeft() {
top.window.resizeTo(200, 90);
top.window.moveTo(0, 510);
alert("Shrink Left");
}

function ShrinkRight() {
top.window.resizeTo(200, 90);
top.window.moveTo(600, 510);
alert("Shrink Right");
}
-->
</script>
</HEAD>
<BODY TEXT="#FFFFFF" BGCOLOR="#848684" ALINK="#FFFFFF" VLINK="#FFFFFF" LINK="#FFFFFF" onload="javascript:Start()">
<TABLE CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR>
<TD VALIGN="TOP" ALIGN="LIEFT"><FONT SIZE=-1>&nbsp;<< <A HREF="javascript:ShrinkLeft()">Shrink</A><BR>&nbsp;<< <A HREF="javascript:ShrinkLeft()">Left</A></FONT></TD>
<TD VALIGN="TOP" ALIGN="CENTER">
<FONT SIZE=+2><B>YOU HAVE
<img name="led1" border="0" src="led0.gif" width="17" height="23">
<img name="led2" border="0" src="led0.gif" width="17" height="23">
<img name="led3" border="0" src="led0.gif" width="17" height="23">
SECONDS LEFT</B></FONT>
<BR><IMG BORDER="0" src="blink2.gif">
</TD>
<TD VALIGN="TOP" ALIGN="RIGHT"><FONT SIZE=-1><A HREF="javascript:ShrinkRight()">Shrink</A> >>&nbsp;<BR><A HREF="javascript:ShrinkRight()">Right</A> >>&nbsp;</FONT></TD>
</TR></TABLE>
</BODY>
</HTML>

If would like I can email you the whole page zipped up with gifs etc..

Ta,
Greg

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

Thanks, I will do some testing and see what I can find.

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

Hi Scott,

Have you seen the same behaviour or is it just me?

I was wondering if you know why this is happening?

Ta,
Greg

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

Sorry, yes this is a problem with the interaction between PWB and IE. The IE Web Browser Control is not passing the java resize commands through to PWB. I am in the process of creating a fix for this. Hopefuly I should have a fix for it soon.

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

Thanks,

Greg

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

Hi Scott,

Do you think that the fix for this will be in the next release (2.05? I think)?

Ta,
Greg

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

I am hoping to have it fixed for PWB v2.05, but I can not promise it. This problem, although I initially thought was simple on the surface, is turning out to be pretty elusive.

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

Hi Scott,

Was this problem resolved for 2.05 (or close to resolved?).

Don't think that I'm hassling you, because the script is of very minor importance. I'm just curious.

Ta,
Greg

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

We are still working on resolving the resizeto issue. We felt with the additions to PWB v2.05 it was important to release it without the resizeto issue fixed. Sorry.

--Scott

Tim
Spectator
Spectator
Posts: 1
Joined: Tue Apr 05, 2005 5:31 am

Resize Issue Update?

Post by Tim »

Please could you tell me if this issue has now been resolved? We've upgraded to the latest version (v2.07), but are still having problems with window.resizeto()

Has anyone found a way round this problem?

Thanks
Tim

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

Unfortunately this issue has not been resolved yet, but we are continuing to work on it.

--Scott

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

The ResizeTo, and MoveTo, issue has been resolved and is currently being tested.

See the following post for more details.
http://teamsoftwaresolutions.com/phpBB2 ... .php?t=519

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

I do so love coming back from holidays and finding good news!

Thanks Scott.

I'll download it and try it out as soon as I get a chance. I've got several hundred emails to clear first. :cry:

GregP

Post Reply