You define dummy, but do not call it. I do not think this works like that, and not in the HTML property onclick.
I suggest you move the dummy element () to a separate block of code:
<script type='text/javascript'>
function dummy(that) { alert(that.toString())}
</script>
and then:
<div onclick="dummy(this);" class="next">></div>
or programmatically use this function as follows:
document.getElementById("myDummyDIV").onclick = function(event) { ..... }
source
share