You can't set onclick
like that in the same way that you would set the onclick
attribute in HTML -- you need to set it to a function, e.g.:
document.getElementById('manual_link').onclick = function() {
submit_security_redirect(); return false;
};
When adding event handlers via Javascript, calling addEventListener
is actually better than setting onclick
, but unfortunately doesn't work in IE versions 8 and below, which is one of the reasons why cross-platform libraries like jQuery are great for event handling.
BTW, arguments.callee is deprecated (see Arguments.callee is deprecated - what should be used instead?).