Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSCallback Server Closed: Stopping callbacks

I am making application using phonegap in android. I am using cordova 1.6.1

I am getting this error when i call html file from my javascript callback function.:

JSCallback Server Closed: Stopping callbacks

i am calling html file using

navigator.app.loadUrl("file:///android_asset/www/html/sync.html");

I have also tried to call html using window.location = "../html/sync.html"; but it gives me same error..I have all the permission required to use internet in menifest.

like image 946
dreamcoder Avatar asked May 05 '12 06:05

dreamcoder


Video Answer


1 Answers

I got the solution:

I created inline script in my html page and in that script i called first login method then i called html calling line.by this way i have achieved success callback and redirected to html page.

here is the code:

function  loginfunc()
{
    loginV();

    console.log("before loadUrl:");
    if(sessionStorage.getItem('UserId') != -1)
    {
        window.location.replace('../html/sync.html');
    }
}
like image 96
dreamcoder Avatar answered Sep 23 '22 16:09

dreamcoder