cwdjrxyz said:
The current popular browsers seem to support iframe including IE7 and
recent browsers from Firefox, Opera, Seamonkey, Flock, and Safari for
Windows. Officially iframes are not for strict Doctypes such as html
4.01 strict, xhtml 1.0 strict, or xhtml 1.1, but many browsers seem to
work on these strict Doctypes anyway when you include an iframe.
However such strict Doctype pages will not validate at the W3C, if
that troubles you.
There are still quite a few who do not like frames or iframes for
various reasons. It is past my bedtime, so I will leave it to others
to make comments on this subject if they wish.
In the application I have, I use iframes to contain <selects>s, and
populate them by reloading the iframe. That is, when a choice is made by
the user elsewhere on the page, the <select> is populated according to
the user's choice. In my case this requires going back to the server as
loading all the data when the page is initially loaded doesn't scale.
Advantages: the script on the server does all the work (database
lookups, formatting all the html).
Disadvantages: it might be a deprecated approach. There are some
cosmetic issues I haven't bothered to sort out (the <select> can get
longer and no longer fir properly in the assigned space).
Alternative approach is ajax. Earlier this year I tried this in one of
my iframe apps to see how it might work. At that stage, just a strict
replacement of the functionality.
Advantages: not a deprecated approach
Also it looks a lot
smoother, and it could also be that I could integrate the app with the
database a lot better than it is today (i.e., rethink the whole app).
Less html is needed as the <select> is not in a separate page.
Disadvantages: I use optgroups in some of the <select>s, and it was
hard to get these to look the same in various browsers. While several
browsers seemed to refresh nicely if the <select> became wider, MS
Explorer (inevitably) did not, so it looked very messy. I was doing a
lot of the work that the iframe script did on the server side, with
JavaScript on the client side.
(Note, as this is all for a private user group, the client *will* have
JS enabled).
I stopped testing at this point, but I will be looking into ajax a lot
more (not for these apps, though, as I am retiring), as I only scratched
the surface so far.
To the OP: I'd say decide carefully what you want your app to do. You
can use iframes and they ware well supported, but ajax might be a better
approach.