There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
External Frames included in outbound links


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
ChunkyTeXas's Avatar
Member with 83 posts.
 
Join Date: Dec 2002
16-Oct-2007, 12:40 PM #1
External Frames included in outbound links
Hey guys,

My boss wants me to add a frame to the top of every page we link to. So when a user clicks a link on our site, a frame with links back to our site appears at the top of that site. Sort of like TutoriaLIZED.com.... anywhoot, I haven't done this in, oh i dont know? 5 years! .... but my boss wants it done.

So can anyone help me out?

Thanks!
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,430 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
16-Oct-2007, 03:05 PM #2
Here is an example of doing this using PHP. I'm sure the same could be done using JavaScript, sort of like this:

Main site HTML:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <title>Frameset Link</title>
</head>
<body>
<A HREF="linkframe.html?url=http://www.techguy.org">Click here</A> to open in a frameset!
</body>
</html>
Target frameset:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HEAD>
    <TITLE>Link frame test</TITLE>
<SCRIPT TYPE="text/javascript">    
function loadSite() {
   loc = String(self.location);
   idx = loc.indexOf("?");
   if (idx > 0) {
        urlPos = loc.indexOf("=", idx);
        websiteURL = loc.substring(urlPos + 1);
        document.getElementById("website").src = websiteURL;
   }
}
</SCRIPT>
</HEAD>
<FRAMESET ONLOAD="loadSite()" ROWS="20%,*">
    <FRAME NAME="top" SRC="link-info.html" FRAMEBORDER="1">
    <FRAME NAME="website" ID="website" SRC="#">
</FRAMESET>
Link-info (where your website link goes):
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<body>
<H1>This frame has the <A HREF="http://www.google.com/">link back to my site</A>!</H1>
</body>
</HTML>
The bottom frame should have the appropriate website loaded. Attached is a screenshot.

Peace...
Attached Thumbnails
external-frames-included-outbound-links-frameset-test.jpg  
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:18 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.