I was doing:
document.testForm.item = 'blah';
rather than
document.testForm.item.value = 'blah';
It didn't seem to cause an error which was useful. Only wasted an hour of my day :)
java is not alone
jmm on 2002-07-17T18:18:05
Perl would happily accept that and just overwrite the reference to the lower level structure.
javascript pet peeves
wickline on 2002-07-17T18:26:55
1) no 'use strict'
You can accidentally misspell a variable in one place and
the thing won't just blow up in your face right away...
Instead, it will wait until you least want it to blow up.
2) horrible weak typing implemtation
- var foo can be either string or integer (cool)
- foo + bar can do either concatenation or addition (hmmm)
- html input fields cannot be typed
- so how does it know when to turn 1+1 into 11 versus 2?
- it doesn't! You freqently have to throw *1 in to tell it
- same with comparison operators
Fortunately, I've only ever had to two do projects in javascript.
...nevertheless, I still have scars :(
-matt