By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,518 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

javascript: window.open ie6 vs ie7

P: n/a
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("Micro soft")!=-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.ima ges["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

Oct 6 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

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

Oct 7 '06 #2

P: n/a

sc********@gmail.com wrote:
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.
about 30% smaller!

Oct 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.