Reputation: 961
I managed to create a login form using reactJs
:
https://jsbin.com/qehifu/1
I get this error on IE9
(works fine on Chrome):
SCRIPT5007 : Unable to get the property value "remove": null object or undefined
SCRIPT5007 : Unable to get the property value "add": null object or undefined
isValid: function (input) {
//check required field
if (input.getAttribute('required') != null && input.value ==="") {
input.classList.add('error'); //add class error
input.nextSibling.textContent = this.props.messageEmail; // show error message
return false;
}
else {
input.classList.remove('error');
input.nextSibling.textContent = "";
//rest of the file...
}
can you guys help ? thanks
Upvotes: 0
Views: 432
Reputation: 2966
The ClassList
API was only introduced to IE in V10.
You could think about using a polyfill, like the one here > https://github.com/eligrey/classList.js/
Source: https://developer.mozilla.org/en-US/docs/Web/API/Element/classList#Browser_compatibility
Upvotes: 2