javascript: window.open ie6 vs ie7

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 popup too small. why ?

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;}</style>');writeln
'<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if
(parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.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('window.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
 
S

scriptguru

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 popup too small. why ?
1. Slightly smaller or really small?
2. Remember there is no real release of IE7. Betas and release
candidates may contain bugs.

Val Polyakh
http://trickyscripter.com
 
F

Francesco

Francesco напиÑав:
1. Slightly smaller or really small?
2. Remember there is no real release of IE7. Betas and release
candidates may contain bugs.

about 30% smaller!
 

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

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top