Posted on: 02/09/03 04:23pm
By: Anonymous (eccc)
A long time ago I found some javascript code that would cause cause links to on your page that lead outside of your website to open in a frame with one of those "Click here to return ..." banners across the top of the page... that way a user never really leaves your website.
I have since lost the code and haven't been able to find it again. Anyone seen this or have implemented it themselves?
Not a Geeklog Questions...
Posted on: 02/10/03 11:37am
By: T1Pimp
It would be simple enough to code one up, but how about just opening the links in a new window? That way they don't actually leave your site, but don't have the annoying "click here to return" like hotmail. To do that just build you link with the < a href="" target="_blank">adasdada</a>. The target=_blank will cause the browser to open the link in a new window.
---Paul 'T1Pimp'
http://www.Huggybeer.com - Geek news with attitude
Not a Geeklog Questions...
Posted on: 02/10/03 04:15pm
By: Anonymous (Anonymous)
I wrote a small script written in php not javascript that does this. You're more than welcome to use it. You can download it
here[*1] . I don't have formal instructions since I've been the only one using it. So, here's the cliff notes:
The script will frame any accessed link. The top frame displays two links: one with your site's name on the left and "break" the frame on the right. When the site's name link is accessed, it returns the person to your website. This wording can be easily changed to whatever you want like "Click here to return." You can also add more links than those two if you want. For those who do not have frames enabled in their browsers, they will only see the other page displayed (you can't frame a page if they have it turned off).
At the top of the script, you can configure these items: your domain name, your site's name (this is what will appear on the top frame), frame height, background color, link and hover colors, font family, font size, font weight, and character set.
Place the extracted script "out.php" in a directory on your server. Let's say you place it right under the public_html directory. When you want to frame an outgoing link, you would then use this format:
http://www.yourdomainname.com/out.php?url=http://www.someothersitesname.com/
You must use ?url= in front of the other site's URL that you want framed otherwise the script will forward you back to your main domain. You can also make a directory (let's say it's called "out") and rename the script to index.php. In this case, you use this format to call it:
http://www.yourdomainname.com/out/?url=http://www.someothersitesname.com/
That's it.
Not a Geeklog Questions...
Posted on: 02/10/03 04:32pm
By: Anonymous (Anonymous)
You then have the annoying pop up windows instead. Many people like me hate those worse, and it's mainly because advertisers have abused them so badly. Those who block pop ups can't access the info at all. At least with frames turned off, the people can still see the info but you lose them.
It's really what people perceive is the lesser of the two evils. They're both kinda bad but they're the only tethers one can use. Ideally, it's best not to use either one.