#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Belgium
    Posts
    39
    Rep Power
    14

    JavaScript problem in Netscape


    //***************************************************
    //this only works in IExplorer

    function refresh(){
    clearInterval(tmrRefresh);
    document.location.reload;

    }

    function logout(){
    window.parent.frames["fraMain"].location = "../login.php?logout=";
    tmrRefresh = setInterval("refresh()",20);

    }
    function login(){
    window.parent.frames["fraMain"].location = "../login.php";
    tmrRefresh = setInterval("refresh()",20);

    }

    //**************************************************
    This works fine in IE but the page keeps reloading in Netscape...

    I've tried every variant I know off (history.go(0),history.reload,setTimeOut,...)
  2. #2
  3. No Profile Picture
    Seņor Member
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2000
    Posts
    1,157
    Rep Power
    38
    Please provide this code in context (a few URLs would be ideal) so we can see how these functions are being called.
    Michael
  4. #3
  5. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16
    Not sure I follow the logic of exactly what you're trying to do, but a couple of obvious things:

    1) Why set an interval only to clear it immediately? setTimeout (notice the intercapitalization) was designed for run-once timers

    2) reload() is a function - don't forget the parentheses

    3) Are you declaring tmrRefresh globally (or, alternately, window.tmrRefresh) ? A variable local to the 'launcher' function dies when it does

    Also, there's no document.location property (it's a synonym for document.URL) and it doesn't have a reload() method. You presumably want the window.location property.
    Last edited by adios; September 18th, 2001 at 04:36 PM.
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Belgium
    Posts
    39
    Rep Power
    14
    http://havocinc.freephp.digiro.net
    this is the URL
    I've tried it with setTimeout too

IMN logo majestic logo threadwatch logo seochat tools logo