[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

Why does this work in all browsers except IE??

I have this popup script that works great in Firefox and Safari but doesn't work in Internet explorer which I really need it to work in! Any ideas how to make it work in IE?

<script language="javascript" type="text/javascript">
<!--
/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
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>

Open in new window


onclick="NewWindow(this.href,'Rate this pic!','820','800','no','center');return false" onfocus="this.blur()

Open in new window

0
jonofat
Asked:
jonofat
  • 2
  • 2
1 Solution
 
GaryCommented:
IE doesn't allow for a name to be passed as an argument in a popup and you'll notice even in FF there is no window title, so change it to '' (two apostrophes)
0
 
jonofatAuthor Commented:
Thanks for the response. Not sure where to change to two apostrophes? "
0
 
GaryCommented:
win=window.open(mypage,myname,settings);

becomes

win=window.open(mypage,'',settings);
0
 
jonofatAuthor Commented:
Awesome, thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now