SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry resize window problem

    Hello

    i have this javascript that changes a popup window to a fullscreen or back....

    function maximiseWin() {
    if (window.screen) {
    var mywidth = screen.availWidth;
    var myheight = screen.availHeight;
    window.moveTo(0, 0);
    window.resizeTo(mywidth,myheight);
    }
    }

    function minimiseWin() {
    var leftpos = (window.screen.width/2) - (415);
    var toppos = (window.screen.height/2) - (320);
    window.moveTo(leftpos,toppos);
    window.resizeTo(786,591);
    }

    its activated simply by "javascript:minimiseWin()" or "javascript:maximiseWin()". it works as a page on its one however when the page with the buttons are a frame it does'nt work on ie pc and does something bizare to the frame where the buttons disappear off the page. it also works fine on ie on mac both in or out of frames.

    if you want to have a look at my page its at http://www.zendco.com/bottom.html

    any help would be appreciated
    Gar

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, that link works fine in IE6. Have you got a link with it actually in a frame, so we can see the problem?
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it top.window.resizeTo(786,591);
    I belive you can use parent.window.resizeTo(786,591); aswell, but top, is what i use..

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes very stupid of me, up to now i have been programming on mac and used

    window.moveTo(0, 0);
    window.resizeTo(mywidth,myheight);


    which works fine, so just needed the 'top' and it works fine on pc now.

    thanks!
    Gar


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
  •