i\'ve been playing with MVC for a while now, but since the project i\'m on is starting to get wind in its sails more and more people are added to it. Since i\'m in charge of
As a matter of safety/best practice, you should always use the module pattern. If you also use event handlers rather than shoving javascript into the onclick
attribute, you don't have to worry about naming conflicts and your js is easier to read:
This is trivially easy to extract into an external file if you decide to.
Edit in response to comment:
To make a function re-usable, I would just use a namespace, yes. Something like this:
(function() {
MyNS = MyNS || {};
MyNS.DisableInputsForSubmit = function() {
//yada yada
}
})();