D&C GLug - Home Page

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

Re: [LUG] IE8 borked?

 

On 8 Jun, 2011, at 9:19 pm, Joe Buckle wrote:

On Wed, 2011-06-08 at 11:45 +0100, tom wrote:
Just been writing a bit of javascript and it looks like IE8 is screwed:

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..
Tom te tom te tom

What is it you're trying to do by doing this? Are you trying to add text fields on demand on the client side with a button onclick event? Or just
trying to produce elements dynamically using javascript? ]

elem.attribute.type="text";

is more likely to read something like

documnent.getAttribute("type", "text");

Again this depends one what you're trying to do.


Without knowing anything about what you're trying to achieve, it's poor ux to have controls/widgets appear and disappear. Rather have them visible but disabled, and then dynamically enable them according to program logic, or else use some kind of workflow/wizard/tabs. Or, as so often, throw it away, start again, and use your second design -- it's almost always loads better.

--
Phil Hudson                  http://hudson-it.no-ip.biz
@UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63


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