I’ve been experiencing intermittent problems with my web-based application, which uses simple Javascript. Currently, all my <script></script> code is placed at the bottom of my web page, after the </html> tag. Every so often, if I click on a button or link that uses the script code, I get an error “Object excepted”. The error never seems to make sense because I haven’t altered the script code in weeks. I took a closer look at the source of the page and I noticed that the source ended just before my script code! It seemed as though the browser just stopped parsing and did not read the page further. A very strange problem because, like I said, it doesn’t always occur.
Anyway, where is the best place for script code on a page? Inside the html tags? Before the body? After, …?
Thanks,
SAFX