PHP beginner |
|
Hallo, ik heb dit popupscript:
<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
<!--
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}
// -->
</script>
<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'> <!-- var win=null; function NewWindow (mypage ,myname ,w ,h ,pos,infocus ){ if(pos=="random"){myleft =(screen .width )?Math .floor(Math .random ()*(screen .width -w )):100;mytop =(screen .height )?Math .floor(Math .random ()*((screen .height -h )-75)):100;} if(pos=="center"){myleft =(screen .width )? (screen .width -w )/2:100;mytop =(screen .height )? (screen .height -h )/2:100;} else if((pos!='center' && pos!="random") || pos==null){myleft =0;mytop =20} settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings); win.focus();} // --> </script>
en op mijn ene server doet dat het prima, maar op mijn andere server doet hij het niet.
als ik op onderstaande link druk op de ene server geeft hij netjes een popup, maar bij de andere komt dit in de url balk te staan:
javascript:NewWindow('http://www.leendertroossien.nl/oefenn/Bio-foto%27s/drumcorps%20Triton2.jpg','popup','800','482','center','front');
javascript:NewWindow('http://www.leendertroossien.nl/oefenn/Bio-foto%27s/drumcorps%20Triton2.jpg','popup','800','482','center','front');
dit is de link:
<a href="javascript:NewWindow('http://www.leendertroossien.nl/oefenn/Bio-foto%27s/drumcorps%20Triton2.jpg','popup','800','482','center','front');">
<a href="javascript:NewWindow('http://www.leendertroossien.nl/oefenn/Bio-foto%27s/drumcorps%20Triton2.jpg','popup','800','482','center','front');">
weet iemand wat ik fout doe?
|