Hello,
I had made a post about this before the forum crash, so I am going to try to repost.
One of the forum members, forgot his name, helped me create this script. The script is made to show different headers on my single page depending on the referring page.
The thing is, once the user starts navigating through my site. It goes back to the default header for all the pages. I want to be able to create the same header on my pages based on the original referral. How do I do this, cookies?Code:<script type="text/JavaScript"> function checkReferrer() { if (document.referrer == "URL1") { document.getElementById("divURL1").className = "show"; } else if (document.referrer == "URL2") { document.getElementById("divURL2").className = "show"; } else if (document.referrer == "URL3") { document.getElementById("divURL3").className = "show"; } else { document.getElementById("divDefault").className = "show"; } } </script> <style type="text/css"> .show { display: inline; } .hide { display: none; } </style> </head> <body onload="checkReferrer()"> <div id="divURL1" class="hide">Content for URL1</div> <div id="divURL2" class="hide">Content for URL2</div> <div id="divURL3" class="hide">Content for URL3</div> <div id="divDefault" class="hide">Default content</div> </body>
Thank You
.


Reply With Quote
Bookmarks