SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inconsistant popup window size problem

    I have produced a site based around its performance on IE5+/NN6+ (standards, blah, blah..)

    In this site I have a popup window, but I'm getting reports that IE (5.5) for PC is using the dimensions set in the script as outerwidth/outerheight dimensions.
    The canvas area should be 454px wide by 516px high and this is what I get on IE 5.1 Mac without problem.

    This sizing error means that the bottom and right edges of my page (as seen on PCIE 5.5) are off-page and this is in the area of the navigation.


    Anyone got a rock solid x-browser/x-platform open window script that will make the canvas area the size it should be on IE PC too?

    I could use resize script that would go into the destination html page, but I'd prefer to get the popup right first time rather than have it jiggle around as it resizes.

    I am reluctant to use resizeTo or resizeBy with fixed dimensions as I cannot be sure that all IE5+ chrome dimensions are the same (all location, status, directories, etc... will be switched off in the popup, but it is not chromeless).

    I have tried a resize script that makes sense to my (very) limited understanding of javascript , but it fails to work (fails to do anyhing, in fact):


    var myW = outerWidth - innerWidth
    var myH = outerHeight - innerHeight

    window.resizeTo(innerWidth + myW,innerHeight = myH)


    It's probably junk (I usually get by fine with DW + extensions), but I like to have a crack at things first before I throw my hands up (though the latter follows the former with predictable regularity)

    So anyway, anyone know how I can make the popup the right size first time?

    p.s. Does anyone know if this is IE 5.5 PC specific or can I expect this to be the case with all PC versions of IE? (popup size > outerwidth...)
    The site is targeted at users who will use Mac, but this is the only problem that PC users are getting (that I know of) so I'd like to get it ironed out.

    Thanks in advance
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Best way of doing it is determining the size by using the clientHeight, innerHeight, pixelHeight... whatever... but then using this to choose a set size.

    ie if it's less than 1024 choose 800x600 as the screen size of the popup.


    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure you got what I'm after.

    The feedback I have had from a PC IE 5.5 user was using 1024x768, so screen size wasn't a factor in the erroneous window size.

    I'm after a popup that is 454(w) x 516(h), but IE 5.5 on PC is taking the dimensions I set in the popup script and using them as the window's outer dimensions (i.e. including chrome).

    The popup size I want should fit 800 x 600 as it is.

    I'm not really sure how the screen resolution is relevant.

    Please elaborate.

    I have seen details about 'grabbing' the innerHeight (and writing it to page) but I've not found how to 'set' it (thereby guaranteeing the canvas size (viewable area))

    I've tried...


    window.innerwidth = 454;
    window.innerheight = 516


    ...but it's not doing anything (at least on my setup)
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Location
    Las Vegas
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm having the same problem, i'm keeping an eye on this thread for a resolution......there's gotta be a way to have a cross browser solution for this.

    -t

  5. #5
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  6. #6
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Flawless_koder
    http://www.mozilla.org/docs/dom/domr...dow_ref27.html
    Thx, but already been there (to that page in fact), tried that (as I showed in my previous post)- no go.

    It did nothing when I tried it in my IE 5.1 (Mac) and I'm not going to implement something that doesn't work in my own browser (no matter how small a minority my platform/setup may be in.)


    Addendum:
    From what I can gather innerWidth is a Netscape/Mozilla specific take on the DOM.
    The IE equivalent is apparently document.body.clientHeight.

    I have tried that also with equal success (i.e. none)


    So where do I go from here?
    Last edited by Bill Posters; Apr 12, 2002 at 11:19.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •