PDA

View Full Version : problem with ajax



andryi
12 Aug 2009, 2:20 PM
Hi all, I've a problem with my application,

this is the Extjs


var task = {
run: function(){
count=count+1;
doAjax();
},
interval: 1000
}
var runner = new Ext.util.TaskRunner();
runner.start(task);

function doAjax() {
Ext.Ajax.request({
url: 'prueba/ajax2.jsp?Action=D',
method: 'GET',
success: function ( result, request) {
var textArea2 = Ext.get('sp_Txt').dom;
textArea2.value += result.responseText+ "\n";
},
failure: function ( result, request) {
Ext.MessageBox.alert('Failed', 'Successfully posted form: '+count);
}
});
}

var top2 = new Ext.FormPanel({
frame:true,
title: 'Atention',
autoHeight: true,
bodyStyle:'padding:5px',
width: 650,
items: [
{
items:
sp_Txt
}
],
buttons: [
new Ext.Button(sp_Btn)
]
});

top2.render(document.body);




and the page jsp than do the reference, return a String

so, When I run my application it works fine, but only 2 minutes aproximatly, and my webserver is glassfish, can anyone help me?
why only 2minutes and not 24hours?:S:S