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.

Disponible pour intervention 

Si vous recherchez quelqu'un pour renforcer temporairement votre équipe ou si vous avez besoin d'aide pour que l'IT aide votre société, n'hésitez pas, contactez-moi !

Lun Mar Merc Jeu Ven Sam Dim
    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