PHP gevorderde |
|
Ik heb je code letterlijk gecopieerd en getest, werkt zonder fouten ... of ik snap je probleem niet helemaal.
Onderstaand mijn test code:
<html><head><script>
function lala(img){
var w,h,u;
w=0;
h=0;
u=img;
//alert(u);
foto=new Image();
foto.src = u;
w=foto.width;
h=foto.height;
// alert(w);
// alert(h);
winpops=window.open(u,"","width="+w+",height=" + h+"");
}
function plaatje(img) {
foto = new Image();
foto.src=(img);
window.open(img,"", "width=" + foto.width + ", height=" + foto.height +"");
}</script><title>Booo!</title></head><body onLoad="lala('./cacti_day.png')">Boo!</body></html>
<html><head><script> function lala(img){ var w,h,u; w=0; h=0; u=img; //alert(u); foto=new Image(); foto.src = u; w=foto.width; h=foto.height; // alert(w); // alert(h); winpops=window.open(u,"","width="+w+",height=" + h+""); } function plaatje(img) { foto = new Image(); foto.src=(img); window.open(img,"", "width=" + foto.width + ", height=" + foto.height +""); }</script><title>Booo!</title></head><body onLoad="lala('./cacti_day.png')">Boo!</body></html>
|