3 Replies Latest reply on Jun 28, 2010 9:47 AM by Gibatronic

    javascript events don't work


      I tried so many ways to put an event in a div!

      But none of them works...


      Here what I tried:

      • window.getElementById("content").onclick = function() { alert("ALOHÁ!"); }
      • window.getElementById("content").addEventListener("click", function() { alert("ALOHÁ!"); });
      • $("div#content").click("click", function() { alert("ALOHÁ!"); });
      • window.htmlLoader.window.getElementById("content").onclick... (yeah, I know... bizarre)
      • ...and others, that are more bizarre than the last one!


      I'm running them with this:

      window.onload = function() {

           // CODE



      All this in the initial window, set to be transparent and chromeless.


      It's strange... because *.innerHTML works, just the goddamned events don't!

      I'm working with AIR for AJAX developers at Eclipse with the Aptana plug-in...


      Please, somebody save me! ♫