SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    May 2001
    Location
    London
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    window.self resize problem

    why doesn't the following script work?

    Code:
    <script language="JavaScript">
     <!--
    
    self.moveTo(("0"),("0"))
    self.resizeTo("800","770")
    void(outerWidth=800);  
    void(outerHeight=770);
    self.menubar.visible=false;
    self.toolbar.visible=false;
    self.locationbar.visible=false;
    self.personalbar.visible=false;
    self.scrolling.visible=false;
    self.statusbar.visible=false;
    
    //-->
    </script>
    the error = self.menubar is not an object

  2. #2
    SitePoint Addict
    Join Date
    Nov 2001
    Location
    Dublin, Ireland
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Works fine for me in IE6, what browser are you using?

  3. #3
    SitePoint Member
    Join Date
    May 2001
    Location
    London
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm using ie5, is there some of a work around for ie5?

  4. #4
    SitePoint Addict
    Join Date
    Nov 2001
    Location
    Dublin, Ireland
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure, maybe someone else can help ... have you tried it in Netscape?

  5. #5
    SitePoint Member
    Join Date
    May 2001
    Location
    London
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea tried in netscape 4.7 and it doesn't work and doesn't display any errors...

  6. #6
    SitePoint Addict
    Join Date
    Nov 2001
    Location
    Dublin, Ireland
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hm, well ... it seems IE5 is just being a b**ch. Anyway, just out of curiosity why is it so important to have the window at that exact location and that exact size?

  7. #7
    SitePoint Member
    Join Date
    May 2001
    Location
    London
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    coz i've got a flash movie goin into that widnow.
    The window resizes fine thats not the problem.. the problem is that i don't want the locationbar and the tool bars to appear..

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

    Re: window.self resize problem

    Originally posted by nabbs
    why doesn't the following script work?

    Code:
    self.moveTo(("0"),("0"))
    self.resizeTo("800","770")
    I have a moveTo and resizeTo on my page, but my code goes:

    Code:
    window.moveTo(0,0);
    window.resizeTo(322,220);
    Both my moveTo and resizeTo work fine with or without the window. part of the DOM command.

    So maybe it's something to do with all the extra parentheses and quotes you are using.
    Your code is very inconsistant.
    There's no reason to have the moveTo and resizeTo co-ords displayed in different ways.
    (Why have you done it that way?)

    Just a complete stab in the dark.
    Last edited by Bill Posters; Mar 6, 2002 at 13:11.
    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
  •