Solved

window.open displays empty window

Posted on 2011-03-21
5
539 Views
Last Modified: 2012-06-27
Following a Windows Update to their Windows Server 2003 R2 SP2 servers at the weekend, Citrix server users have complained that links (in their browser based app) that previously opened up a new window (via a call to javascript window.open) no longer work. All they see is a new, empty window and the hourglass goes busy, forever.

I have cut down the script to the bare minimum and the problem is constant.

I have also set the browser back to default settings. Plugging the URL straight into a browser works fine.

My HTML.......
<html>
<head>
<script language="JavaScript" src="javascript/popup.js" type="text/JavaScript"></script>
</head>
<body>
<input type='button' onclick="javascript:popUpWindow('http://server/app/pagex.htm')" value="Popup!?" />
</body>
</html>

And the javascript.......
function popUpWindow(URLStr)
{
  try{
     var width = (screen.width*.75)
     var height = (screen.height*.75)
     var left = (screen.width/2) - width/2;
     var top = (screen.height/2) - height/2;
     window.open(URLStr,'popUpWin',                 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
     } catch(e) {alert(e.description);}
}

Open in new window

0
Comment
Question by:touch-base
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35182665
You have a mistake in the code (illegal space before top=).

I would do this:

<a href="http://server/app/pagex.htm" onclick="return popUpWindow(this.href)">Popup!?</a>
<html>
<head>
<script language="JavaScript" src="javascript/popup.js" type="text/javascript"></script>
</head>
<body>
<input type='button' onclick="popUpWindow('http://server/app/pagex.htm')" value="Popup!?" />
</body>
</html>

And the javascript.......
function popUpWindow(URLStr)
{
  try{
     var width = (screen.width*.75)
     var height = (screen.height*.75)
     var left = (screen.width/2) - width/2;
     var top = (screen.height/2) - height/2;
     var w = window.open(URLStr,'popUpWin','scrollbars,resizable,copyhistory,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top);
     if (w) return false;
     alert('Popup blocker active?');
     return true;
  } 
  catch(e) {alert(e.description);}
}

Open in new window

0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35182713
0
 
LVL 1

Author Comment

by:touch-base
ID: 35182752
The URL is fine (it's okay when plugged into a browser) and the code (although a hasty cutdown of the original!) works on certain other machines.

Am beginning to point fingers at Actxprxy.dll; I'm closing down for the day but will get back to this...
0
 
LVL 1

Accepted Solution

by:
touch-base earned 0 total points
ID: 35231180
I have discovered that an application upgrade caused problems with 3 DLLs; ole32.dll, actxprxy.dll and ieproxy.dll. Ole32.dll caused the browser problem but once re-registered, all was okay.
0
 
LVL 1

Author Closing Comment

by:touch-base
ID: 35304206
Self diagnosed solution.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question