Never Forget to RTFM
This week I got reminded of the first rule of CS: RTFM. I wanted to use the HTML input tag with type="image". In one page everything was fine but in another I got totally bizarre behaviour. After a few days of distracted head-scratching I opened the HTML 4.01 Specification (W3C Recommendation 24 December 1999). The image button is actually a submit button and not a button button as I had so brazenly assumed. The reason it was OK in the first instance was because there weren’t any form tags in the page. I could almost hear the clicking sound in my head when I (finally) looked it up in the F… manual.
I got another case of bizarre behaviour when I defined a delete() function in Javascript. This time I didn’t bother to consult any documentation; I figured that there’s already an inbuilt delete() function, so I renamed mine to doDelete() and it worked fine.
Comments: