Hi, I have the following prototype JavaScript code
Event.observe( window, 'load', function() {
Event.observe( 'agreement', 'click', function() { alert("It works") });
});
It is used on only one page of my site, what is the best way to organise it?
I suppose I could put it in its own file, and include it only on that page. Or I could add it to one big file which is loaded for the whole site, but I tried doing that, and got an error because the element "agreement" does not exist on all pages.