I have found a few examples of Java Popups online and have modified the function slightly to be more dynamic with several arguments. The following code seems to work fine with Firefox, but in IE it just routes to the href and the Java onClick is not followed. I have checked my IE settings and Java is enabled and working fine.
<SCRIPT LANGUAGE="JavaScript">
function MyPopUpWin(url, vidName, vidW, vidH) {
var iMyWidth;
var iMyHeight;
//half the screen width minus half the new window width (plus 5 pixel borders).
iMyWidth = (window.screen.width/2) - (vidW / 2 + 10);
//half the screen height minus half the new window height (plus title and status bars).
iMyHeight = (window.screen.height/2) - (vidH / 2 + 10);
//Open the window.
var win2 = window.open(url,vidName,"status=no,height="+ vidH +",width="+vidW+",resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");
if (window.focus) {win2.focus()}
return false;
}
</SCRIPT>
I am calling the script as follows
<a href="popupex.html" onclick="return MyPopUpWin(' Window',1000,500)">Link to popup</a>
Any help is greatly appreciated!!
<SCRIPT LANGUAGE="JavaScript">
function MyPopUpWin(url, vidName, vidW, vidH) {
var iMyWidth;
var iMyHeight;
//half the screen width minus half the new window width (plus 5 pixel borders).
iMyWidth = (window.screen.width/2) - (vidW / 2 + 10);
//half the screen height minus half the new window height (plus title and status bars).
iMyHeight = (window.screen.height/2) - (vidH / 2 + 10);
//Open the window.
var win2 = window.open(url,vidName,"status=no,height="+ vidH +",width="+vidW+",resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");
if (window.focus) {win2.focus()}
return false;
}
</SCRIPT>
I am calling the script as follows
<a href="popupex.html" onclick="return MyPopUpWin(' Window',1000,500)">Link to popup</a>
Any help is greatly appreciated!!