javascript: window.open ie6 vs ie7

Discussion in 'Javascript' started by Francesco, Oct 6, 2006.

  1. Francesco

    Francesco Guest

    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
    Francesco, Oct 6, 2006
    #1
    1. Advertising

  2. Francesco

    Guest

    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, 2006
    #2
    1. Advertising

  3. Francesco

    Francesco Guest

    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!
    Francesco, Oct 12, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QnVydA==?=

    IE7 and window.open issue to HttpHandler for downloads

    =?Utf-8?B?QnVydA==?=, May 2, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    3,472
    leandro.almeida
    Jul 15, 2009
  2. Jeff Louella

    IE7 on XP vs IE7 on Vista

    Jeff Louella, Mar 1, 2007, in forum: HTML
    Replies:
    9
    Views:
    503
    Adrienne Boswell
    Mar 2, 2007
  3. Ganesh

    IE7 + Vista - Window.Open issue

    Ganesh, Oct 3, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    2,932
    Scott M.
    Oct 3, 2007
  4. Replies:
    0
    Views:
    104
  5. Replies:
    1
    Views:
    101
Loading...

Share This Page