window.open window.resizeto ie 7

F

Francesco

Hi,
got a problem, hope someone could help:

this function should open a popup showing an image automatically
adjusting browser window's height and width. It works fine with IE6 but
not with IE7.
In IE7 opens a smallar popup and image is not shown 100% why ?

many thanks


function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</sty­le>');writeln

'<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if
(parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigat­or.appName.indexOf("Microsoft")!=-1)?1:0;}');



writeln('function reSizeToImage(){');writeln('if
(isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');

writeln('height=100-(document.body.clientHeight-document.images[0].height);­');

writeln('window.resizeTo(width+130,height+50);}');writeln('if
(isNN){');
writeln('window.innerWidth=document.images["George"].width;');writeln('wind­ow.innerHeight=document.images["George"].height;}}');

writeln('function doTitle(){document.title="LeMieCime.it di Viali Athos

©";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no"
onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=FFFFFF scroll="no"
onload="reSizeToImage();doTitle();self.focus()"
onblur="self.close()">');


writeln('<body></html>');


close();



}}


thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top