SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    NS - Reload Problem

    My code:

    function reload() {
    if (document.layers)
    {
    if (location.href == location.href)
    {
    flag = 1;
    if (flag == 1)
    {
    window.location.reload();
    }
    }
    }
    }

    What im trying to do is:
    If Netscape
    Check if Page is loaded fully
    If loaded
    Reload page

    That's my goal..This code doesn't work..Don't even know if im on the right path..but I want to set a flag to say if the page hasen't been reloaded then reload it..

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi meztec,

    As I stated in the pm, you need to load your selection list and then execute a history.go(0) after checking for document.layers. You cannot put the code within an onLoad or anything else that will cause the page to begin loading again. You just want a refresh.

    function fillSel()
    {
    ...code for filling the selection list from an array
    ...code ends here. the list is filled, but the display is wrong

    if (document.layers)
    history.go(0);
    }

    If you post a url with the selection list, I might be able to help you further.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Vince..
    Thanks for the reply...
    Here's my code:
    http://172.16.102.2/test/

    The first error will be fixed....please ignore that one...
    But you can see the loading differenes between the two browsers..

    Now I just need to figure out how to implement the history.go(0); within this code..

    Thanks for any help

  4. #4
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi meztec,

    I've tried twice -- once this afternoon, and again now.

    I keep getting 'server busy/not responding' errors

    Could you repost and/or check the link?

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  5. #5
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: NS - Reload Problem

    Originally posted by meztec
    [B]My code:

    function reload() {
    First thing I noticed was you name your function the same as an elready existing Javascript method. You should maybe look at changing that as it screws thing up sometimes
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  6. #6
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im sorry...
    Try this link..



    ...
    Last edited by meztec; Nov 19, 2001 at 08:09.


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
  •