Good day!
Why is it that when I make the following javascript code external, some codes doesn't work
<form name="Keypad" action="">
</form>
var FKeyPad = document.Keypad; // DOESN'T WORK ANYMORE
var Accumulate = 0;
var FlagNewNum = false;
var PendingOp = "";
function NumPressed (Num) {
if (FlagNewNum) {
FKeyPad.ReadOut.value = Num;
FlagNewNum = false;
}
else {
if (FKeyPad.ReadOut.value == "0")
FKeyPad.ReadOut.value = Num;
else
FKeyPad.ReadOut.value += Num;
}
}
How can I make it work?
Thank you,
document.Keypad? what's your dependency (js library)?$(function (){...code...})else onload event