A.K.A: Why I hate myself
I spent a good portion of time (about 4 hours) fixing a obsure (to me) JavaScript onload bug. I was like, why doesn’t this work and tried many different tests to make it work. Now that it does work, I can finally move on to other problems to which I’ll spend another day or two trying to fix. I’m getting more deeply into JavaScript and the research and tests will help me learn JavaScript and keep me from making the same mistakes down the road.
The Problem
I was doing the body onload=”” with the function, but then I decided that it would be better if I used an event handler. The reason behind that was when I moved the code to an external file, the function stopped working. It was a way for me to debug and fix the problem. I’m going to try to move the code back to an external file, so that it can be used again elsewhere.
The Solution
After a great deal of research I realized that the example I was using was just puesdo code and found the right event handling functions for both Mozilla and IE.
Possibly Related Posts:
- Game Engine Development and Open Source
- Plans for Base CMS
- Bullet: E-Book Library Management and Content Server
- Using ZendFramework 2 beta1 For Directory Project
- Project Plans
I’ve got something due tomorrow that I have spent 4 hours just working on javascript for… and this is one page out of about 30 to do! I can’t get anywhere because of this language – totally with you. It’s case sensitive and drives me nuts with the object expected. Wish i could expect my fist against the creators face.