Forum Moderators: open
When people found our side through google them sometimes come to the page directly. The page is not shown in a frame but full-screen. Is it possible to put the frames / menubar depending on the referer?
Please help!
I am a VB programmer, feeling for programming but not an expert in javascript ;-)
What you really need is a DOM reference, like Goodman's Dynamic HTML on O'Reilly.
fruit.html
<script language=JavaScript>
// set up a var called myref to obtain the referrer
myref=document.referrer;
// get the position of the first '/' after 'http://' in th referrer
numchar=myref.indexOf('/',7);
// extract the baseURL from the referrer
myBaseURL = myref.substr(0,numchar);
// test if the baseURL is the URL you want it to be and if not redirect
if(myBaseURL!= 'http://www.degezondeapotheker.nl') window.location.href = 'http://www.degezondeapotheker.nl/fruit0.html';
</script>
And in the fruit0.html the following:
<FRAMESET cols="10%,1*" frameborder="no" border="0" framespacing="0">
<FRAME name="menu" scrolling="NO" noresize src="menu.html" title="">
<FRAME name="start" src="fruit.html" title="">
</FRAMESET>
So it starts fruit.html again.
Is this possible in just one page?