PDA

View Full Version : Pop-Up window help



FrickenTrevor
02-02-2010, 12:03 AM
I got this pop up window script from DD here:



<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,re sizable=no';
win=window.open(mypage,myname,settings);}
// -->
</script>



<a href="http://www.google.com" onclick="NewWindow(this.href,'mywin','250','320','no','center');return false" onfocus="this.blur()">YourLinkText</a>

but it wont work in Fire Fox 3.
The only browsers that it works in is IE 7 and 8

Any help on this guys?

Nile
02-02-2010, 12:58 PM
If you just want to make a pop up: http://www.google.com/search?q=making+pop+ups+with+javascript&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

FrickenTrevor
02-05-2010, 12:33 AM
That does not work at all. I am trying to get the code above to work in Fire Fox :mad::mad: