Ciao a tutti,
sto usando questo script per aprire una finestra popup; il problema è che aprendone due di seguito me le apre una dentro l'altra mentre vorrei che ne aprisse due separate.
Cosa devo modificare?
codice:
<script LANGUAGE="JavaScript">
<!-- Begin
function ViewImage(ifile,ix,iy,ititle) {
var win;
var sWidth;
var sHeight;
var NS = (document.layers) ? 1 : 0;
win = window.open("","imageviewer","width="+ix+",height="+iy+",left="+((screen.width/2)-320)+",top="+((screen.height/2)-240)+",menubar=no,toolbar=no");
if (NS) {
sWidth = win.innerWidth;
sHeight = win.innerHeight;
} else {
sWidth = win.document.body.clientWidth;
sHeight = win.document.body.clientHeight;
}
if(sWidth!=ix || sHeight!=iy) {
win.close();
setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
return;
}
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("[img]+ifile+[/img]</div></body></html>");
win.document.close();
}
// End -->
</script>
Fatemi sapere.
Grazie mille