It is impossible to use xui.Ajax

Develop and Deploy Cross-Browser Web Apps .

It is impossible to use xui.Ajax

Postby Sergei » Wed May 22, 2013 1:56 am

Maybe I'm wrong, but xui.Ajax has an error in the parameter reqType (or the documentation).
My example:
<script language="javascript">
function xxx1(){
try {
xui.Ajax(
{
uri:"http:/127.0.0.1:8000/isvapi/family_dom/",
query:{li1i1l1ilillii1li1:"data data data", ttt:"oooooo"},
onSuccess: dom_otvet,
onFail:dom_fail,
threadid:null,
method:"POST",
asy:true,
rspType: 'json',
{# reqType: 'json',#}
onStart:null,
onEnd:null,
beforeStart:null,
beforeFail:null,
beforeSuccess:null
}
).start();
}
catch (e) { e.message ? e.message : e; };
}
</script>

result is correctly:

request.method-- POST
request.path-- /127.0.0.1:8000/isvapi/family_dom/
request.POST-- <QueryDict: {'li1i1l1ilillii1li1': ['data data data'],
'ttt': ['oooooo']}>
request.GET-- <QueryDict: {}>

and if you remove comments:
............
reqType: 'json',
............

result is not correct:

request.method-- POST
request.path-- /127.0.0.1:8000/isvapi/family_dom/
request.POST-- <QueryDict: {}>
request.GET-- <QueryDict: {}>

Where is my mistake? (if the error is mine)).
:roll: By the way, linb.Ajax worked correctly.
Sergei
 
Posts: 31
Joined: Sat Apr 27, 2013 9:48 am

Re: It is impossible to use xui.Ajax

Postby Sergei » Wed May 22, 2013 4:41 am

The question is removed:
The fact that the WEB server Django (Python) and there JSON data to be read and not request.POST - request.raw_post_data.
Then everything is fine. I apologize)).
Sergei
 
Posts: 31
Joined: Sat Apr 27, 2013 9:48 am


Return to CrossUI for Web Apps

Who is online

Users browsing this forum: No registered users and 0 guests

cron