views:

488

answers:

5

I was going to have a left navigation panel which uses an ajax request to change the contents of the center panel of the HTML.

Should I use HTML frames or simply a "sidebar" DIV? Does it matter?

+2  A: 

Many people argue against using frames: http://www.google.ca/search?hl=en&q=html+frame+problems

ChrisW
+1  A: 

If you're using Ajax, then an IFRAME makes no sense. On the other hand, using an iframe lets your user go back/forward between the pages he's visiting. But I don't understand what are your thoughts about linking together Ajax and an IFRAME. Google does this exactly for the purpose I mentioned a few lines above, to allow users to go backwards (no forward), but I don't know how they've implemented it.

Ionuț G. Stan
I thought an iframe was different from a frame? Are we talking about he same thing?
Richard The Third
I didn't intend to use iframes. I think maybe you misread the question.
Richard The Third
IFRAMEs or FRAMEs are basically the same in this scenario. Why would you want to use frames in combination with Ajax? Isn't it a little more complicated than having a single page in which the actions on the navbar update the contents of an element in the same page? But as I said, pay attention to the functionality. I know some developers that have done an entirely Ajax-based admin system. In the end the owner hated it so much that she had to rewrite it. She really needed the Back button.
Ionuț G. Stan
really simple history, on google code. look it up. it does exactly as you've described w/ ajax and iframes.
Ape-inago
@Ape-inago, old good HTTP does the same too, without all the hassle. Anyway, depends on the needs.
Ionuț G. Stan
+2  A: 

A div. You should pretty much never use frames. Doing so causes problems, which others have described.

Jacob
+2  A: 

You should never use frames. That is very bad usability.
See "Avoid using frames" and Why Frames Suck (Most of the Time)

Load the content and bind it to the div. That's the best solution for dynamically updating a page.

jQuer.load
jQuery.post

Steven
A: 

Both approaches have drawbacks. Leaving the problems that are common to both aside for the moment:

  • Using frames gives you orphan pages.
  • Using Ajax means that it requires JavaScript support and locks out search engines from the content (except for the front page) entirely. It breaks the back button.

There are reasons why almost every side that implements common content on mutiple views just includes duplicates of the common content on every page.

David Dorward