I did see a warning in the jQuery docs about using async = False with the 
"deferred" jqXHR object (i.e. when defining the error callback).  Here is 
what they say:


>    - *async* (default: true)
>    Type: Boolean <http://api.jquery.com/Types/#Boolean>
>    By default, all requests are sent asynchronously (i.e. this is set to 
>    true by default). If you need synchronous requests, set this option to 
>    false. Cross-domain requests and dataType: "jsonp"requests do not 
>    support synchronous operation. Note that synchronous requests may 
>    temporarily lock the browser, disabling any actions while the request is 
>    active. *As of jQuery 1.8, the use of async: false with jqXHR 
>    ($.Deferred) is deprecated; you must use the success/error/complete 
>    callback options instead of the corresponding methods of the jqXHR object 
>    such as jqXHR.done() or the deprecated jqXHR.success().*
>    
>

On Sunday, June 1, 2014 9:31:46 AM UTC-7, Piotr Ring wrote:
>
> Hey ther.
>
> I'm bulding a package app on desktop and i have strange error.
> This is my javascript function for ajax on desktop application:
> function getrequest(url_request) {
>         var respond = {};
>         var request_success = false;
>         respond['error'] = null;
>         var request_ajax = $.ajax({
>             url: url_request,
>             type: 'get',
>             dataType: 'json',
>             async: false,
>             contentType: 'application/x-www-form-urlencoded',
>         });
>         
>         request_ajax.done(function(data){
>             request_success = true;
>             respond['data'] = data;
>         });
>         
>         request_ajax.fail(function(jqXHR, textStatus, errorThrown) {
>             respond['error'] = textStatus;
>             respond['errormore'] = jqXHR.responseText;
>             respond['errorstatus'] = jqXHR.status;
>             respond['errorthrown'] = errorThrown;
>         });
>         
>         respond['success'] = request_success;
>         
>         return respond;
>     }
> this is my php file on server :
>     header('Access-Control-Allow-Origin: *');    
>     
>     $wzor_logowania     = "/^.[\/\\\?].$/";
>     $success            = false;
>     $error                = null;
>     $response            = array();
>     
>     $login                = $_GET['login'];
>     $password            = $_GET['password'];
> ...
>
> on first time on ogin send and respond i successfull, but when a tree to 
> reach the next respond of my ajax (change only file php and get atrybutes), 
> I have got a error:
> textStatus: error, responseText: undefined, status: 0, error: 
> [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: 
> "JS frame :: app:///{}/js/jquery.js :: .send :: line 7869" data: no]
>
> is there any body to help on this. I traing to pass this about 2 months 
> white now.
>
> thanks 
> Pete
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to