Showing posts with label iFrame. Show all posts
Showing posts with label iFrame. Show all posts

Oct 9, 2009

iFrame It!

We will be using an iFrame in our group project so I decided to blog about it as it seems a very valuable tool to help keep a web page dynamic. iFrames, inline frames, are similar to standard frames except that they are smaller and more dynamic. It's like having a smaller browser page imbedded on a larger page. We've all browsed to a page and while reading it had to scroll down to read the full page. iFrames also help to eliminate this effect. You can view the frame with a scroll bar within the page. This is nice sometimes if you want to view something while not leaving a content area.

Example of an iFrame where content from another page is viewed:


Javascript can be used to load a frame very easily. There are two ways to do this. Here's a link to an example demonstrating the load of a new page into the iFrame using Javascript (the code is also available on this page):
http://www.dyn-web.com/tutorials/iframes/load.php

Another really cool feature about iFrames is that they can be dynamically generated which makes them a great option for 'tooltips'. If you hover over text or an object a little popup window appears with a picture or text.

One more cool feature with iFrames is that you can write a script to change the content of the frame daily. This would be helpful if you want to show a tip of the day. The code can be found here: http://www.dynamicdrive.com/dynamicindex17/dowiframe.htm

As you can see, iFrames are another great way to help keep web page elements dynamic. I'm sure there are even more uses for iFrames that I haven't covered but this is a start.