You know you should use JavaScript when the task cannot be accomplished with any other technology.
That’s what Doug suggested when I asked him for a nicer spin on a something that was going through my head:
JavaScript: If it can be done in another language, it should be done in another language.
That just sounds so negative, which is definitely not what I’m getting at here. But I am trying to make a point. JavaScript is capable of doing taks that can also be accomplished in other languages. JavaScript is also capable of doing things that cannot be done in any other language. Some examples are probably in order.
Form Validation
You can validate a form with JavaScript. You can create a great user experience doing it this way, but of coures you’d be dumb not to validate all the inputs again with a server side language before processing them. If you are going to pick one or the other, go server side. If it can be done with another language, use the other language.
Inserting Content
I just had a circumstance where I needed to load in a block of dynamic navigation onto th