Hi there,
I have had a script on my web site which opens a popup window when clicked. It works in Firefox and I am sure that it worked in IE6 - but it does not work in IE7.
The javascript part is from Eric King who posted the script on to DynamicDrive.com:-
<script language="javascript" type="text/javascript">
<!--
/****************************************************
Author: Eric King
Url: [url]http://redrival.com/eak/index.shtml[/url]
This script is free to use as long as this info is left in
Featured on Dynamic Drive script library ([url]http://www.dynamicdrive.com[/url])
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';win=window.open(mypage,myname,settings);}
// -->
</script>
The calling line is:-
<input name='button1' type='button' href ="2coupleweekend/table2coupleweekend1.html" title="2 Couple Weekend League - Table" onClick="NewWindow(this.getAttribute('href'),this.getAttribute('title'),'500','350','no','center');return false" value=" View League Table ">
Please try it at :- http://nkelsey.byethost24.com/fixtures/fixtures2couplemidweekdiv1.php
by clicking on the 'View League Table' button.
As I said, it works in Firefox but not IE7.
Can anyone help me make it work in both... or does anyone have another script or way of performing the same operation... or other idea as to how I can achieve the same end?
Thanks in anticipation.
Regards
Allan Thompson