Search code examples
javascriptbuttonhandlerformpanel

Adding more than one button to a Ext.form.Formpanel in Javascript


I have the following code in javascript:

buttons: [{
                text: 'Yes',
                handler: function()
                        {
                        answer = 'true';
                        w.close();
                        }
            },{
                text: 'No',
                Handler: function()
                        {
                        answer = 'false';
                        w.close();
            }

        }]

But only the button labelled 'yes' responds. Any Ideas?

James


Solution

  • Misspelt 'handler' as 'Handler'. Silly syntax error!