.

Saturday, October 21, 2006

Why not use an IFRAME hack in ModalDialogV2 ? #

If you've read my Modal Dialog enhanced article; you may wonder the reason why I obsinately insist on not using an IFRAME to stop the bleed through when a layer moves over a HTML Select element and I use SPANs instead.

I have received several e-mails asking the reason behind it. And since the method I propose in the article is much complicated than simply using and IFRAME, you are right in wondering the reason why.

I have several considerations most of which are philosophical in nature rather than practical.

  • First of all; the ugly IFRAME hack (which most of the DHTML and AJAX API's prefer to use) is a non-semantic usage of the IFRAME element.
    The legitimate usage of the IFRAME is to provide external data; such as a disclaimer or a web service.

  • Introducing a non-semantic element (with or without JavaScript) does not eliminate the fact that it is used in a semantically incorrect fashion.

  • May be in the future IFRAMEs wil behave differenly and allow bleed-through, who knows.

    However spans will always behave as intended because I use them in a semantically correct way: They are used to wrap text around. And this usage is a supplementary method to enhance user experience; not an ugly hack that utilizes the user agent's render characteristics.

  • Yet another reason; people may tend to browse frame support disabled. Or their user agents may not have frame support at all (and old browser, or a PDA for instance).
    I know, that's equally true for JavaScript, but who really turns JavaScript off anyway?

  • From my testings, IFRAME hack only works in IE5.5 and above (it may be a concern for some people; but I don't think it's a big deal).

  • Activex, Java, Flash etc.. is another story. If you would like to implement the third method; you can replace them with a static alternative (an image or text may be). But I admit that's a bit overkill.

As per the good news; you don't need IFRAME masking in IE7. It's no longer necessary.

...

I'd like to stress once more that it is not a bad idea. There are tons of DHTML tooltips, menus etc. around using the IFRAME hack. It's just me being a little picky.

May the source be with you!

Labels: , , ,


 bu yaziyi sevdin mi?  hemen una ekle!
 


0 Coments


Post a Comment

Links to this post:


Create a Link

<< Home




Recent Posts

RSS

RSS register icon

Other Blogs

Various

Sponsor

Profile Information

Browser I Suggest

Sponsor

Dikkatimi Çekenler