Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Redirection problems

  • 30-08-2000 01:22PM
    #1
    Registered Users, Registered Users 2 Posts: 310 ✭✭


    I currently have a html page that when accessed redirects a user to a another page.
    The problem is that when a user tries to go back through their history they cannot get past the redirection page. This is quite confusing to users. The only way I can think of getting around this is to check from which page the user is coming from and take appropriate action based on that but the history object only has one property and that is the length property.
    I enclose the code I am using.
    This code works fine.
    Any help apprec.

    [code]
    <html>
    <head>
    <TITLE>Redirection Page</TITLE>

    </HEAD>
    <script language="JavaScript">
    <!--
    function redirect()
    { top.location="http://ipaddress/index.asp";

    }
    //-->
    </script>

    <BODY onLoad="redirect();">

    <P> </P>

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    //For IE
    if (document.all) {
    redirect();
    }
    //-->
    </SCRIPT>
    </BODY>
    </HTML>


Comments

  • Registered Users, Registered Users 2 Posts: 310 ✭✭Cerberus


    I found a way but I don't understand how it works.
    &lt;HTML&gt;
    &lt;HEAD&gt;
    &lt;META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"&gt;
    &lt;TITLE&gt;Redirection Page&lt;/TITLE&gt;
    
    &lt;/HEAD&gt;
    &lt;script language="JavaScript"&gt;
    &lt;!--
    if (document.images)
        location.replace('http://www.somewhere.com/index.asp');
    else
        location.href = 'http://www.somewhere.com/index.asp';
    //--&gt;
    &lt;/script&gt;
    		
    &lt;BODY&gt;
    &lt;/BODY&gt;
    &lt;/HTML&gt;
    


  • Registered Users, Registered Users 2 Posts: 1,176 ✭✭✭podgeen


    christ above u know stuff..
    what happened u up in dublin...


Advertisement