it does not allow me to select buttons if something is entered in textbox-Collection of common programming errors
Open the browser console. When you click a button, you’ll see the following error:
Uncaught ReferenceError: currenttotal is not defined
It’s thrown by this line of code:
console.log(currenttotal);
There’s another problem which appears to be preventing currenttotal
‘s initialization:
If I put a breakpoint at this line: var letter = $('#numberAnswerTxt').val();
(inside of getButtons
), I can see that the variable "letter"
is a string that looks like "3"
. Strings do not have a property named String
, so letter.String
is undefined. This is why the TypeError: Cannot call method 'fromCharCode' of undefined
is thrown.
So I think that for
loop should go something like this:
for(var i = 65; i
Originally posted 2013-11-09 20:01:28.