How can I fix a "not a function" JavaScript error in Firefox's console?
The code below works fine in Chrome but does not work in Firefox. The error displayed in the Firefox console is "Error: document.forms.frmCreateNewEmployee.elements is not a function".
document.forms['frmCreateNewEmployee'].elements('employeeType').value = document.getElementById("userType").options[document.getElementById("userType").selectedIndex].value;
How can I resolve this error开发者_开发技巧?
Change .elements('employeeType')
to .elements['employeeType']
to fix the error.
精彩评论