D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] IE8 borked?

 

On 08/06/11 12:40, Simon Waters wrote:
tom wrote:
Just been writing a bit of javascript and it looks like IE8 is screwed:
IE has always been odd in many ways.

var elem=document.createElement("input");
elem.attribute.type="text";

seems to work on most browsers but not IE8

cant prove for certain ie8 is 'wrong' but it looks like it..
MSDN says 'createElement("input")' creates a text input field, so it
shouldn't need changing to "text" quite so soon.

Although never tried this, so maybe it is just not set via the attribute
array.
i.e.
did you try: elem.type="text"
did you try checking the value is not "text" before setting it to "text"?


I don’t really care what MSDN says - its a Javascript DOM thing. It works fine on other browsers. I can get it working in ie but doing what you say but the fact is elem.attribute.type should be a valid thing to set to text - MS are just breaking the DOM either through laziness or short-sightedness.
Tom te tom te tom

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq