I\'ve seen that you can attach events like this
can you do the same
Something like this:
document.getElementById('myButton').onclick = function() {location.href='http://stackoverflow.com';return false;}