SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Non-Member
    Join Date
    Jan 2002
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    script for opera 6 reload page on resize???

    hi guys,

    im trying to code me a script that will reload the page if opera 6 reloads the page. similar to the netscape 4+ reload page trick when working with DHTML/layers. anybody got any ideas on this one, well the script i am after really but any thoughts are still cool.

    thanks,

    scott

    http://fluidinkpress.vr9.com
    http://epoets.tech.nu

  2. #2
    SitePoint Evangelist azizur_rahman's Avatar
    Join Date
    Nov 2001
    Location
    London, UK
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not sure if you'll find anything but check
    http://www.dynamicdrive.com/
    Azizur Rahman
    Web Application Developer

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only way I know of is to run a timeout(), and check the page width/height every few seconds - reload if changed, but thats just crude.

  4. #4
    SitePoint Evangelist azizur_rahman's Avatar
    Join Date
    Nov 2001
    Location
    London, UK
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont think you'll need to use the time out.

    just use the same code that used for NN resize but chnage the code to reload the page unless its IE.

    here is the code from Macromedia Dreamweaver that uses to check for resize and reloads if required
    Code:
    <script language="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 think this will work but.. if it does not then let me know and I'll modify it to work for Opera as well.
    Azizur Rahman
    Web Application Developer

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Opera dosen't support the onresize event, if it did we wouldn't be here, talking about this

  6. #6
    SitePoint Evangelist azizur_rahman's Avatar
    Join Date
    Nov 2001
    Location
    London, UK
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    um... then I guess we cant do much about it, part from desiging the site properly... in a way so that it works on every browsers.

    let me know what dicision you make.
    Azizur Rahman
    Web Application Developer


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
  •