Skip to content

Client-side validation of filled radiolist does not work in IE9 #73

@ondrejmirtes

Description

@ondrejmirtes

It still shows an alert even when a radio button is selected while submitting the form.

The issue is reproduced in this commit.

It is caused by these two lines in netteForms.js:

    } else if (elem.name && !elem.form.elements.namedItem(elem.name).tagName) { // multi element
        return Nette.getValue(elem.form.elements.namedItem(elem.name));

When I revert them to the pre-2.3 version, it works fine:

    } else if (elem.form.elements[elem.name] && !elem.form.elements[elem.name].nodeName) { // multi element
        return Nette.getValue(elem.form.elements[elem.name]);

But I am not 100% sure this is the right solution because I don't know what was the reasoning behind using namedItem and tagName instead of nodeName.

You can test the sandbox in IE9 with a virtual machine from here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions