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