Jump to content


iFrame alternatives


5 replies to this topic

#1 Darren Taylor

    Young Padawan

  • Members
  • Pip
  • 6 posts

Posted 16 February 2009 - 08:35 AM

When I used to design sites (mostly for personal use), I used iFrames. The reason for doing so was:
  • avoid loading nav menus every time a knew page was opened
  • easily updating the index page without having to change it on every page
  • having content appear in the same place
Nowadays, i know iFrames are pretty much frowned upon, so I was wondering if there was any other way to deal with the 3 points above.

Thanks in advance
Darren Taylor

#2 derek.sullivan

    Jedi In Training

  • Members
  • PipPip
  • 341 posts
  • Gender:Male
  • Location:Georgia
  • Interests:preaching, programming, music, friends, outdoors, moves, books

Posted 16 February 2009 - 12:28 PM

You can use css to replace iFrames.. such as

#tag 
{
border: #000 1px solid;
width: 400px;
height: 50px;
overflow: auto; // will make all the content scroll... will not overflow the border of this div tag
padding: 2px;
}

<div id="tag">
SCROLL
SCROLL
SCROLL
SCROLL
SCROLL
etc etc
</div>

And you can use JS/AJAX to automatically update the box without having to reload the page etc etc etc.. Hopefully that helped.

#3 Darren Taylor

    Young Padawan

  • Members
  • Pip
  • 6 posts

Posted 18 February 2009 - 06:49 PM

I don't really understand how CSS can help.

This is the layout I am trying to code:
http://img261.images...oncept23qz3.jpg

As you can see, I'd normally shove an iframe in the middle and have all the links load up in there, but I'd rather slice it and code it so that the layout will extend as more content is put in.

I've tried with tables, but it doesn't work out ideally as I can't set 3 tables aside each other (one for images, one for content, and other for fesch).

Does anyone have any more input or can point me in the direction?

#4 Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 24 February 2009 - 06:52 PM

My alternate to frames is by using php. You create the main template then use a php switch to switch the content that goes in the content box.

Then you can use css and divs to code the layout which is the most accepted way.

Hope this points you in the right direction.

#5 Jacorre

    P2L Jedi

  • Members
  • PipPipPip
  • 824 posts
  • Gender:Male
  • Location:USA
  • Interests:Computers, Technology, Internet, Graphic/Web Design, Music, Soccer

Posted 23 March 2009 - 03:12 PM

I agree with Mr. Matt. You can section your pages up such as having one file for the header, one for the footer, one for the sidebar, etc. That way you only need to update one file which would then apply across all pages of your site.

#6 Evans Davis

    Young Padawan

  • Members
  • Pip
  • 11 posts
  • Location:U.K.
  • Interests:I Like to do Forum Posting,Blogging,Watching Movies,Listening Musics etc.

Posted 30 July 2009 - 07:52 AM

have used IFRAME in certain cases where the code is on another server.
This
seems to work well. There are certain differences;
1. IFRAME WILL pay attention to any header CSS or JS code, where FP INCLUDE
doesnt
2. IFRAME seems to be a bit more picky about definition of width and length
than FP INCLUDE
3. IFRAME has NEVER doubled up on me.
4. Page counters via CGI do not get incremented on IFRAME documents as
reliably as when FP INCLUDE is used. I dont know why.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users