SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Script Question

  1. #1
    SitePoint Member
    Join Date
    Dec 2002
    Location
    USA
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Script Question

    I've been finding the following snippet in the header of a lot of sites
    Code:
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    //-->
    </script>
    I am wondering what this does and if it is effective?

    Thanks
    Who made the fatal error this time

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a fix for a bug in Netscape 4 (incorrect display when the user resizes the window)
    In Macromedia Dreamweaver there is a command, Add/Remove Netscape Resize Fix, and that's the explanation to the name MM_reloadPage()


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
  •