I have quite a few of these:
function addEventsAndStuff() { // bla bla } addEventsAndStuff(); function sendStuffToServer() { // send stuff // get HTML
You might want to create a helper function like this:
function defineAndRun(name, func) { window[name] = func; func(); } defineAndRun('addEventsAndStuff', function() { alert('oele'); });