odd pop-up behavior

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

Post Reply
amutch
Benefactor
Benefactor
Posts: 113
Joined: Fri Jan 10, 2003 7:39 am

odd pop-up behavior

Post by amutch »

We have a link on a web page that is supposed to call a javascript function to open a new window. This works in IE even when the highest level of pop-up blocking is enabled. But in PWB (2.09.3), it generates a blank window. The odd thing is that if you do a right-click on the link that calls the function, it will open correctly in a new window (select open link in new window if you get a context menu). The link is located on this page:

http://twp.waterford.mi.us/gis/

click on the globe image as this in the link that calls the javascript function.

Andrew

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

Post by Scott »

There does seem to be a problem. I am looking into it.

--Scott

amutch
Benefactor
Benefactor
Posts: 113
Joined: Fri Jan 10, 2003 7:39 am

Post by amutch »

Thanks Scott.

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

Post by Scott »

Here is what we have found so far.

The function in the web page is resizing the new window.

Code: Select all

function newMapWin() {
     
  newWaterfordTwpWin=window.open("","WaterfordTwpMapWindow","toolbar=no,location=no,status=yes,resizable=yes");
  var scrWidth=[b]screen.availWidth[/b];
  var scrHeight=[b]screen.availHeight[/b];
  [b]newWaterfordTwpWin.moveTo[/b](0,0); 
  [b]newWaterfordTwpWin.resizeTo[/b](scrWidth,scrHeight);
  newWaterfordTwpWin.document.location="http://maps.twp.waterford.mi.us/Viewer.htm";
}
The Internet Explorer web browser control PWB is using does not seem to support this in a new window.

However PWB does support it in the same window. Changing the code to the following works.

Code: Select all

function FullWindow()
{
  var scrWidth=screen.availWidth;
  var scrHeight=screen.availHeight;
  top.window.moveTo(0,0); 
  top.window.resizeTo(scrWidth,scrHeight);
}
As a work around you can have the new window open to the map page and have the map page resize the browser.

We are looking for a fix correct the problem directly.

--Scott

amutch
Benefactor
Benefactor
Posts: 113
Joined: Fri Jan 10, 2003 7:39 am

Post by amutch »

Scott,

Thanks. I'll look at modifying our code. We've also added an alternative link for people with pop-up blocking enabled that might avoid that problem. I haven't had a chance to test that out on PWB but that might be a workaround for us as well.

Andrew

Post Reply