Home / Blog

As I'm working on the new interface of MyOwnDB based on YUI, I have discovered 2 subtle differences between IE and FF when creating nodes with YUI 3.

1. You can't change attribute values of INPUT nodes created from a template using the long closing node syntax

Update: IE is actually doing the right thing, as the input tag does not accept a closing tag as defined by the W3C .

By long syntax, I mean closing a tag with an explicit closing tag:

as opposed to the short syntax:

If you create an input node with YUI3 based on the long syntax with IE, you won't be able to set attribute values:

The solution is to use the short syntax to close your tag:

Note that this is only for input nodes. Divs are workling fine with the long syntax:

2. With IE, you can't set the type of an input node to "file"

This code will generate a file field with FF, but a text field with IE:

If you want to make it work with IE, you have to make your template include the type attribute:

I've put a demo page for those interesting in the code, with a YUI console.

I'm available for hire 

If you're looking for someone to temporarily join your IT team, or if you need help to put IT to work in your company, I'm ready to help. Contact me now !

Mon Tue Wed Thu Fri Sat Sun
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31