[web] Frames and Links

Started by
2 comments, last by Desdemona 19 years, 7 months ago
I'm not much of a web developer, so my personal website is pretty plain. I'm using frames at the moment, and index.html file for the site looks like this:

<HTML>

<HEAD><TITLE>ajwright.net</TITLE></HEAD>

<FRAMESET COLS="25%,75%"> 
 <FRAME SRC="menu.html"> 
 <FRAME SRC="news.html" NAME="view"> 
</FRAMESET> 

</HTML>

The menu of the site appears in the left frame, and all the content appears in the right frame. I want to be able to give links out to specific pages on my site, but if people go to those, they wont see the sites menu frame. How can I make sure that this frame always gets displayed? Thanks
Advertisement
Look here for a nice example tutorial on frame 'protection'.
You could use PHP to emit your top-level frame, and pass the page name as a parameter to the frame. Instead of "news.html" you'd emit whatever link they passed in. Make sure the link doesn't contain slashes or colons, though, as that might be someone trying to use your site as container for some spoofing.
enum Bool { True, False, FileNotFound };
Thanks for the replies. I was hoping there was a way using straight HTML, but if I have to use another language that wont be too much trouble...

This topic is closed to new replies.

Advertisement