PDA

View Full Version : TaskRunner + Ajax.request don't work



Forn
1 Aug 2012, 12:27 AM
Hello.

I have the next code:


var runner = new Ext.util.TaskRunner();
var task = runner.start({
run : function() {
var action = new Ulmart.WebAdmin.utils.JavaAction();
action.setActionCode("checkSession");
var json = Ext.JSON.encode(action);

Ext.Ajax.request({
url: baseJavaUrl,
method: post,
params: {
ulmartAction: json
}
});

Ext.Msg.alert('Действие', '"' + json + '"');
},
interval : 1000
});


This code don't work. If I comment ajax the message box will be displayed. So why woth ajax Request it doesn't work?

Forn
1 Aug 2012, 12:41 AM
after removed method parameter all works fine

evant
1 Aug 2012, 12:55 AM
method: post


Is invalid, since you don't have any variable with that name.

Should be:



method: 'POST'