User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 374,144 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,500 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 486 | Replies: 4
Reply
Join Date: Oct 2006
Posts: 120
Reputation: MaxMumford is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Junior Poster

Open all external links with a frame

  #1  
May 12th, 2008
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 =]

Max
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 250
Reputation: buddylee17 is on a distinguished road 
Rep Power: 1
Solved Threads: 45
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Whiz in Training

Re: Open all external links with a frame

  #2  
May 12th, 2008
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.
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Page Title</title>
  6. </head>
  7.  
  8. <frameset rows="100,*">
  9. <noframes>
  10. <body>Your browser does not handle frames!</body>
  11. </noframes>
  12. <frame src="header.html" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="topFrame" />
  13. <frame src="content.html" name="mainFrame" id="mainFrame" title="mainFrame" />
  14. </frameset>
  15. </html>
Reply With Quote  
Join Date: Oct 2006
Posts: 120
Reputation: MaxMumford is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Junior Poster

Re: Open all external links with a frame

  #3  
May 12th, 2008
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,

Max
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 250
Reputation: buddylee17 is on a distinguished road 
Rep Power: 1
Solved Threads: 45
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Whiz in Training

Re: Open all external links with a frame

  #4  
May 13th, 2008
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?
Reply With Quote  
Join Date: Oct 2006
Posts: 120
Reputation: MaxMumford is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
MaxMumford's Avatar
MaxMumford MaxMumford is offline Offline
Junior Poster

Re: Open all external links with a frame

  #5  
May 17th, 2008
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

Max
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 3:15 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC