Welcome to Geeklog Tuesday, January 18 2022 @ 05:53 pm EST

Geeklog Forums

Not a Geeklog Questions...


eccc

Anonymous
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?
 Quote

Status: offline

T1Pimp

Forum User
Junior
Registered: 20/08/02
Posts: 27
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
Paul 'T1Pimp' http://www.Huggybeer.com - Geek news with attitude
 Quote

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. 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.
 Quote

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.
 Quote

All times are EST. The time is now 05:53 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content