...

View Full Version : Change an INCLUDE based on previous page



CyberScout
12-13-2002, 05:08 PM
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

eak
12-13-2002, 07:04 PM
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.

MCookie
12-15-2002, 11:39 AM
<!--#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 -->

CyberScout
12-16-2002, 04:21 PM
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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum