Simple question !
I have this function in my JS file
function getdata()
{
Ext.Ajax.request(
{
url: '/app_dev.php/getdata',
success: function (response)
{
console.log('réponse' + response.responseText);
},
failure: function (response, opts)
{
console.log('server-side failure with status code ' + response.status);
}
});
}
and then a menu with a listeners
menu: [
{
text: 'Import'
},
{
text: 'Consultation',
listeners:
{
click: function (getdata) {}
},
Not working :(.
How can I call the function with clicking on the menu button ?
Please, I am aware this question is noob but don't put me some -1 :-).
From a guy trying to learn javascript !