Hi guys,

Wasn't too sure which forum to put this in as im not sure what kind of script would be used, but this is what I want to be able to do:

Have some kind of script that makes any external link on my website open the link and have a frame with my content at the top (like when you find an image using google images search and theyr frame is at the top.)

Thanks for your time =]


Below is the basic layout of a w3c valid frameset document. Obviously, the header.html is the document containing the header and the content.html is the document containing the content. Unless you use a link target of _parent, A link in the content will only cause the content frame to change and the header will stay intact. The <frameset rows="100,*"> tells the browser that the top frame is 100 pixels in height and the bottom content height is auto(*). Hope this helps.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Page Title</title>

<frameset rows="100,*">
    <body>Your browser does not handle frames!</body>
  <frame src="header.html" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="topFrame" />
  <frame src="content.html" name="mainFrame" id="mainFrame" title="mainFrame" />

Okay thanks for that. The only other thing is that I needed the frames to appear after the link has been clicked on. for example you have a regular page, no frames just content, but when you click on a link which goes to www.google.com, it will use a frame for the top (header.html) which for example would have my logo on it, and then the bottom (main) frame will contain www.google.com. So the site only uses frames when going onto an external link, otherwise no frames are used.

Thanks again,


You'll need a server side script to make this work. What I mean is that you'll have to have a premade frameset with the external link loading dynamically based on which link the user clicked. Can you use php on your site?

yeah i have php but no idea how to use it! I just got a new webhost because my previous one didnt offer php so i was stuck with asp but yeah i have php now... any ideas about what i kind of script i would need then?

Sorry for the late reply

Thanks again for your help