Solved

window.open displays empty window

Posted on 2011-03-21
5
541 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

635 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