Sunday, 22 February 2004

Inline frames

Most people when ever they are talking about web dev work and the word "frames" comes up, most people make a face and shudder. It's never really a pleasant thing to use frames in web pages. Something that I learned about on Friday was something called iframes. It's an frame that you can place and give constraints much the same as an image. It's really quite cool. Webmonkey has a funny tutorial if you want a quick run down.

Here's the context: we want someone to be able to search for documents, and if they are what they want to keep, to add them to a "shopping cart". Well, I know if I was doing that, I would want to preview those pages first. We were talking about doing different ways of doing that, and the solutions were were coming up with were either opening a new window, using (regular) frames, or getting the user to hit the back button. All of these have different problems and none are really an "ideal" solution. Using iframes allow us to control where the user sees the document, and they they never really "leave" the application.

My next concern was if it was IE specific (it isn't), and how it would handle other docs like pdf, doc, html pages with frames, etc. And it came though with shinning colours (for IE 5.5 and mozilla 1.5). I just thought that I would share this in case other people hadn't heard of this either. Something useful for doing web dev work.
Listening to: Wide Mouth Mason - My Old Self


5 comments:

  1. Yeah, I knew they existed. Although for some reason I thought they were IE specific. Maybe at one time they were, back when I was in highschool or something.
    Frames aren't really so bad. I don't know why they get such a bad rap all the time. It was a great way to do things like side/top menus that don't change, back in the day when server side includes were not an option. They had their place. Although I think they may not be so useful anymore.

    ReplyDelete
  2. Yes, they started out in IE4 I believe and Netscape didn't have them until later, in Netscape 4. One of the many IE "enhancements" that Microsoft pushed on us.
    I won't even get started on frames. They were the beginning of the slippery slope into web app land. God help us all. :)

    ReplyDelete
  3. BTW, Webmonkey is closing:
    http://wired.com/news/infostructure/0,1377,62300,00.html

    ReplyDelete
  4. Dang. That sucks. They were one of the few decent tutorial sites out there. :(
    I think I'll try and grab a few of the ones that reference frequently (eg, Thau's JS tutorial and the CSS guide..)

    ReplyDelete
  5. I'm not sure if I'm right or not, but I think all the Advertisement banners on the web use iframes of some sort, so that it refreshes the banner after a certain time interval.

    ReplyDelete