I created a php/javaScript automatisation of our form creation. Thus, when a dialog is created the button are added dynamicly and correctly, but I cannot access the JSON object in the function trigged on the click of the button.
Here is a exemple (The alert does not work, is not display):
aButtons[oGeneratedFormButtons[x].label] = function(){ alert(oGeneratedFormButtons[i].label); });
Can I pass data to the function or is there a way to know which button has been clicked.
Here is a simple sample : http://jsfiddle.net/DavidLaberge/h4Cgp/13/