SoMinty

 

  • Music
  • Movies
  • Food
  • Books
  • Technology
  • Editorials
  • SoMinty
    • Archives
    • Search
    • Tags
    • Writers
    • About
    • Contact
Now Playing:
RSS Feeds: Articles | Links
We Recommend: Hellboy II: The Golden Army
Popular Tags: action | alternative rock | drama | comedy | dessert | thriller | indie | rock | adventure | hip hop
Subscribe via email
Email Address: 

RSSArticles Feed

RSSLinks Feed

 
 
hasLayout
By Andrew Wilson | Sep 17, 2008 | Comment
technology

Recently in the adventures of online programming, I have stumbled upon a new and exciting, yet old and determined bug. One so devious and yet so illusive and incredibly large that I can't believe I have never caught wind of it before. I am describing the hasLayout bug in IE. 

Let me explain. Elements rendered in IE are given certain dimensional variables.  "Layout" is one of those variables that allows IE to draw and bound the content currently being worked on.  Well, what does this really mean?  Basically some elements in the page are given this variable (setting it to true) that lets IE know it needs to draw them according to the standard applied by the layout concept.  

An element can then "gain layout" or "has layout" whenever hasLayout is true.  So when you're developing something, especially dynamic information on the web, you may notice certain things don't look right.  For instance, in my current case, I am using document.createElement("DIV") and document.body.appendChild([object]) to create a custom modal box.  Well, I noticed that when this was done on the fly, and the modal box was to appear... all background-images were missing from the modal box. 

It turns out that even though I have div's with heights, widths, etc... because I am creating them on the fly, they did not 'hasLayout', so to speak.  So a rendering of the object was not fully completing to the point the background-images would randomly not work. And I mean randomly, some would and some would not work, or none at all, or all of them would work.  Very difficult bug to track down, took me nearly 2 weeks to figure it out.  

hasLayout is something that I have missed upon my travels of the web.  I am sure there are many more out there that have missed this interesting concept and bug provided by the good ol' Internet Explorer.  In any case, check out this link for a much more in depth resolution to the issue, and learn while your fixing!

Sponsored: Cheap Hosting
SHARE: Facebook | Del.icio.us | Digg | Newsvine
  • EmailEmail this article
  • Print this articlePrint this article
  • TranslateTranslate: FR | ES | DE
Quanta, Quanta, Don't 'cha Wanta!
...
Comments
roger
(link)

10/13/2008
_

amazing. i have been trying to figure this out for so long.

Name
Email
http://
Message
Post Info

Tags:

internet, internet explorer, programming, web design
...
 
What's that Sound?Win!

You need to upgrade your Flash Player
No. 5

Think you can figure out which song this is? Tell us the name of the artist and the song by the 30th of August, 2008 for a chance to win the new Nine Inch Nails CD.

Polls

Other articles by Andrew Wilson

  • Quanta, Quanta, Don't 'cha Wanta! | 29 Jan 2008

Search

...

Related Articles

    © 2008 SoMinty.com | Powered by Einked Media

    • Search
    • Tags
    • Archives
    • Writers
    • Advertise
    • About
    • Contact