PDA

View Full Version : request function calls files from project's root folder



ahsec
1 May 2012, 6:50 AM
Hi guys...
a simple question for me to keep working....
I'm trying to use request as follows:

Ext.onReady(function(){
Ext.Ajax.request({
url: '/newGui/getPoints.py',
params: {
...a few params
},
success: function(response){
handle success here
},
callback: function(option,reponse,success){
alert("callback");
},
failure: function(response, opts) {
console.log('server-side failure with status code ' + response.status);
}
});


}

however, the way it is right now makes the response be the text inside the file getPoints.py and the result of its execution
the path starts looking for it in the workspace folder of the designer(to where it generates the files I.E workspace/newGui/getPoints.py)...and I want to take my files from the /usr/lib/cgi-bin/getPoints.py (absolute path of linux..) because that is where the apache server runs the files...how can I achieve that??

Thanks All

ahsec
1 May 2012, 6:51 AM
the response is the text and NOT the result of the execution is what I'm getting right now when running it from newGui