views:

10

answers:

0
var Button = createInputButton("checkbox", index);

Button.name = "farmAtivada_"+index;

FM_log(3,"checkboxFarm "+(index)+" = "+Button.checked);
Button.checked = GM_getValue("farmAtivada_"+index, true);

Button.addEventListener("click", function() {
       FM_log(3,"checkboxFarmClick "+(index)+" = "+Button.checked);
       GM_setValue("farmAtivada_"+index, Button.checked)
}, false);

2 questions:

1) why the FM_log is not working from inside the Button.addEventListener("click", function() { ????

2) Button.checked inside the Button.addEventListener will result the checked status before or after the mouse click?