In this line:
!!checkMobileOperator.check(input.val()) && submit.removeprop('disabled'); knocks out an error: Uncaught TypeError: checkMobileOperator.check is not a function
Here is the whole code: http://jsfiddle.net/t52ka/28/
In this line:
!!checkMobileOperator.check(input.val()) && submit.removeprop('disabled'); knocks out an error: Uncaught TypeError: checkMobileOperator.check is not a function
Here is the whole code: http://jsfiddle.net/t52ka/28/
If the question is what kind of error, then:
The checkMobileOperator object does not have a check method
UPDATE :
I would write like this:
Announcement:
var checkMobileOperator = (function() { return { check: checkFunction }; function checkFunction(arg) { // logic return result; } })(); ....
somewhere further
....
checkMobileOperator.check(arg) A lot of errors in the code:
which not defined;CheckMobileOperator object, and the check method is trying to call the сheckMobileOperator function;submit.removeprop method which is not submit.removeprop , but submit.removeProp ;In JavaScript, the case of identifiers is important. Try to pay attention to it. And pay attention to the design code.
which on e.which received completely different errors - tutankhamunSource: https://ru.stackoverflow.com/questions/445308/
All Articles