soyjavi / QuoJS

Micro #JavaScript Library for Mobile Devices
MIT License
2.07k stars 236 forks source link

Error when calling $$.post #55

Closed thomasvalera closed 11 years ago

thomasvalera commented 11 years ago

I have a $$.post sending a command to backend.php. This backend does not echo any data and all works as expected.

$$.post("backend.php", {command: 'next'}, function(response) {});

Only when I echo something from the backend and thus change the code by:

$$.post("backend.php", {command: 'state'}, function(response) {alert(response);});

I get the following error:

Uncaught TypeError: Object # has no method 'call'

I have seen this closed issue 31 but I don't see what I do differently!

Already thanks for your help.

soyjavi commented 11 years ago

$$.post("backend.php", {command: 'next'});

El miércoles, 6 de marzo de 2013 a las 23:46, thomasvalera escribió:

I have a $$.post sending a command to backend.php. This backend does not echo any data and all works as expected.
$$.post("backend.php", {command: 'next'}, function(response) {});

Only when I echo something from the backend and thus change the code by: $$.post("backend.php", {command: 'state'}, function(response) {alert(response);});

I get the following error:

Uncaught TypeError: Object # has no method 'call'

I have seen this closed issue 31 but I don't see what I do differently! Already thanks for your help.

— Reply to this email directly or view it on GitHub (https://github.com/soyjavi/QuoJS/issues/55).

jitendrapatidar commented 10 years ago

hi i 'm jitendra patidra i have use $$.post i have get this type error TypeError: settings.error.call is not a function my code in

var Urls = sitesetting.webRoot + "/HomePagejTemplates/CheckWishListItem.ashx?ItemId=" + ItemId; $$.post(Urls,function (data) { var result = json;

            $$("#WL_" + ItemId + "").removeClass('fa-th-list').addClass('fa-refresh fa-spin');

            if (result == 'False')
            {

                var Url = sitesetting.webRoot + "/HomePagejTemplates/AddToWishList.ashx";
                var parameter = { ItemId: ItemId, QTY: 1, itemsize: itemsize };
                $$.json(Url, parameter, function (datas) {

                    $$("#WL_" + ItemId + "").removeClass('fa-refresh fa-spin').addClass('fa-th-list');
                });
            }
            else {
                $$("#WL_" + ItemId + "").removeClass('fa-refresh fa-spin').addClass('fa-th-list');

            }
            //"WL_" + ItemId + "" fa-refresh fa-spin
            //return;
        });