Web Link

Discussion in 'Web Design & Coding' started by NegativeFactor, Mar 3, 2003.

  1. Does anyone with a hint of knowledge of Javascript (or any other method infact) know of a way of getting a page to automatically follow a link? The hyperlink I want the page to automatically goto is:

    <a href="index.asp" target="_parent">Back to Main Page</a>

    Basically on my website I have 2 frames, one being the small navigation bar at the top and the other containing the information (bottom frame). If you look at the bar at the top you can see a login link, right there is some code on that so when a person logs in it will change to different text and allow them to access the user control panel. However I'm finding it difficult to get the top frame to automatically refresh when a user logs in so the text changes and the user has instant access to the control panel. The link I posted above does exactely what I want to do to get the page at the top refreshed, but how do I get this to automatically refresh. I have tried it with the REFRESH META tag but this is really irritating as the top frame just keeps reloading.

    Basically all I want is an automatic method of following the above link, so it imitates the clicking action automatically.

    Can anyone help?
     
  2. Un4gIvEn1

    Un4gIvEn1 Moderator

    Messages:
    1,084
    I believe this will do the trick....

    <meta http-equiv="expires" content="0">
     
  3. Un4gIvEn1

    Un4gIvEn1 Moderator

    Messages:
    1,084
    constant reloading... must be using Netscape... Am I right?
     
  4. Un4gIvEn1

    Un4gIvEn1 Moderator

    Messages:
    1,084
    Here ya go... maybe this will work better for you.


    <script language="JavaScript">
    <!--
    function MM_reloadPage(init) {
    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>

    Don't ask me what it means... I just know that I use it on my webpage and it works :)
     
  5. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Put this in the validation page (Javascript):

    PHP:
    parent.topFrame.reload();
    or

    PHP:
    parent.topFrame.location.href "top.asp";