Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    pa
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change an INCLUDE based on previous page

    I was hoping to get a script that would look to see where the user came from last and if they came from certain pages certain includes would be shown.


    Like "If previous URL = http://www.google.com, make <--!#include file=../../includes/something.inc--> = <--!#include file=../../includes/google.inc-->

    Basically I want to be able to show a different left nav depending on where they came from using SSI

    Thanks in advance
    CyberScout
    Tall and Proud he stands
    Desert sun his only friend
    The Jumbo Cactuar

  • #2
    eak
    eak is offline
    Regular Coder eak's Avatar
    Join Date
    Jun 2002
    Location
    Nashville, TN
    Posts
    354
    Thanks
    0
    Thanked 26 Times in 26 Posts
    you can not change a ssi line with javascript because the ssi is executed before the JS even loads. you would need to find the referer with some server side includes. i dont use them so i cant help you out but it shouldnt be too hard to find.
    eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <!--#set var="Ref" value="$HTTP_REFERER" -->
    <!--#if expr="$Ref = /google/" -->
    <!--#include virtual="googlenav.html" -->
    <!--#elif expr="$Ref = /altavista/" -->
    <!--#include virtual="altavistanav.html" -->
    <!--#else -->
    <!--#include virtual="nothingspecial.html" -->
    <!--#endif -->

  • #4
    New Coder
    Join Date
    Jul 2002
    Location
    pa
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, I am completely confused by that

    <script type="text/javascript">
    <!--#set var="Ref" value="$HTTP_REFERER" -->
    <!--#if expr="$Ref = /google/" -->
    <!--#include virtual="googlenav.html" -->
    <!--#elif expr="$Ref = /altavista/" -->
    <!--#include virtual="altavistanav.html" -->
    <!--#else -->
    <!--#include virtual="nothingspecial.html" -->
    <!--#endif -->
    </script>

    Which of that do I need to edit for my pages?
    Tall and Proud he stands
    Desert sun his only friend
    The Jumbo Cactuar


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •