studio tomi : factory

03 | 29 :: More JavaScript fun

So I am going 100% DOM acceptable scripting, and today I found another inconsistency between IE and Firefox, and to be honest, I am not sure which side i agree with this time.

   <div id="picname">
<p>title</p>
</div>

Ok so given this code, if you request the childNodes of the element picname, you get different results based on the browser.  IE gives you one child node, specifically the p tag.  Firefox gives you three, the carriage return and white space before the p tag, the p tag itself and the carriage return and white space after the p tag.  Illustration below:

ie

ie childenode

ff

firefox children nodes

if you remove all the whitespace and the newline characters then the firefox works the same way that ie works... I am not sure which is the 'correct' way to do it... it is just good to note if you are goind to do any dom scripting.

03 | 27 :: Bah, IE

This is a minor annoyance when java scripting with IE

Here is a nice little bug/feature in IE.  When you are using the DOM method .getElementById(""), IE not only checks the id attributes of everything on the page, but also the name attributes. ...What?

I had a meta tag with the name "description", and a paragraph tag with the id "description" and i could not get my handy dandy little javascript to run in IE because it kept grabbing the meta tag instead of the paragraph.  That was five minutes of my life I wouldn't mind getting back, hah.

The script worked in firefox, just like it was supposed to, man i love my browser!

12 | 11 :: some interesting articles

So i found a pretty interesting webdesigner blog, called a list apart today.  A lot of the articles are pretty good, i just picked two that seemed relevant to what we are doing

Oh and i found a pretty neat css dropdown menu, this particular flavor doesn't work with ie, but there are ones that do