no alert?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dude1x
    New Member
    • Mar 2014
    • 4

    no alert?

    I have this code and it doesn't seem to alert the fact that I'm pressing a key (this should happen after I click Start). Why? :/

    Code:
    function dynamic_buttons() {
    	var start_button = document.getElementById('start');
    	var stop_button = document.getElementById('stop');
    	start_button.onclick = log_keypress;
    	stop_button.onclick = log_keypress;
    	}
    	
    function log_keypress() {
    	alert('click event happened'); 
    	}
    And here's the "whole" code: code
  • dude1x
    New Member
    • Mar 2014
    • 4

    #2
    done. i forgot calling it :) thank you

    Comment

    Working...