Witam,
Poniższy skrypt nie działa pod IE7+. Nie bardzo umiem sobie z tym poradzić. Może ktoś z forum pomoże w modyfikacji?
<script type="text/javascript"> function popImage(url,windowTitle,windowName,closeOnClick,width,height,t){
closeOnClick=true;
if(!url)return
function readSize(){if(t.complete)showPopup(t.width,t.height);else setTimeout(readSize,1e2)}
function showPopup(w,h){with(window.open('',windowName||'','width='+(width||w)+',height='+(height||h)).document){open();write('
<html><head><title>'+(windowTitle||'')+'
</title></head><body onBlur="self.close()" style="margin:0;padding:0"><img src="'+url+'" style="display:block'+(closeOnClick?';cursor: pointer" onclick="self.close()" title="Zamknij okno"':'"')+'></body></html>');close()}}
if(!width||!height)t=new Image(),t.src=url,readSize()
else showPopup(width,height)
}
Wywołanie:
<img width="350" height="206" onclick="popImage('images/mapka.jpg','Mapka dojazdu','Mapka dojazdu');" style="cursor: pointer;" alt="" src="images/mapka.jpg"/>