View Full Version : Resolved IFRAME question
12-12-2009, 11:47 PM
For my site what I want to do is have the navigation links sitting in one iframe to the left of the page, and have the content be displayed in another iframe on the right side of the page. How would I go about so that when a person clicks a link, it changes the content of the iframe to the right of it, and not itself. Also, for the second iframe, is there a way I can have it auto resize itself to however high the content is? Thanks
Best not to use iframes. What if someone enters your page from a search engine which found the second iframe? you'd have no navigation. There are alos numerous styling issues with iframes because they are so rigid.
Better, I think, either to:
1. use shtml pages
2. use server-side dynamically created pages.
And if that doesn't persuade you, I am sure Aero will be about soon with some more reasons.
12-13-2009, 12:26 AM
And careful when using iFrame, because iFrame is breaking terms of service of Google Adsense.
So if you planning of using Google Adsense, don't do it.
12-13-2009, 12:27 AM
very true, bazz thank you. I decided to scratch the Iframe idea, but I do have another question. The whole point of making the iframes was so that if I need to update my navigation bar, I can update one file and the changes will be spread across the whole site. Is there another way I can achieve this?
12-13-2009, 01:01 AM
bazz mentioned shtml and that include will do that. So will php include. Both are SSI's.
I like php, here's a good tutorial that shows you how. (http://www.tizag.com/phpT/include.php)
.......if I need to update my navigation bar, I can update one file and the changes will be spread across the whole site.
shtml will let you do this. I am a bit rusty on them but, you can use SSI (server-side includes) to make a full web page. By including the various parts of your page - one of them being the nav menu - each part will be its own html file. that means if you include your nav menu as a portion of the page, you will only have to change the single nav menu file, for it to display changed on every page it is included in.
That should get you started but soon, I should think. you'll want to make it all server-side because (as did for me a few years ago), it'll open so many more options for you.
oh-h-h amd CF is a great place to learn how to grow - in programming terms.
I didn't mention php includes because I haven't used them and in fact, haven't used much php. (I prefer perl for some masochistic reason :eek: ). But it's worth listening ot Excavator on that part.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.