I was on #javascript and some feel very strongly against global objects. As an alternative, they suggest using a external script for global stuff. I was wondering:
1) What is wrong with having a global object or variable? for instance: var foo = document.getElementById(“bar”); This is assuming foo will always reference this object through out the script to avoid confusion.
2) How would I have an external script contain the global object and how do I make my javascript reference the object each time I need it(there are many times)?