Works on browser but not as app

412 views Asked by At

I have a problem.
A strange problem.
I have this part of code:

Actions.loadWizzard = function(href)
{
    alert(1);
    var wizardTimer;
    var wizardTimer2;
    if (navigationObject.getLocation(href) === "ProductInformationWizzard") {
        navigationObject.newPage("loading");
        wizardTimer = setTimeout("navigationObject.newPage('contentProductInformationWizzard');", 3000);
        wizardTimer2 = setTimeout("window.productInformationWizzardObject.init()", 1000);
    } else if (navigationObject.getLocation(href) === "contentAdviceWizzard") {
        navigationObject.newPage("loading");
        wizardTimer2 = setTimeout("window.adviceWizzardObject.init()", 10000);
    }
    return;
};

And on the normal browser it works excactly as it should work.
As a WRT though (or phonegap app) it doesn't.
It doesn't give me the alert (used for debugging). It doesn't use the setTimeout.
evaluates instantly or something. And the loading page is not shown.

yeah, sometimes it shows up once.

Another problem is that the loading div has a GIF img. It;s like a loading img.
But the thing is just static. It's like normal image instead of a animated GIF.

How is this possible.

Some notes to the code:

navigationObject.newPage(page);

This hides the current div i'm viewing and shows the div i pass to it.

window.adviceWizzardObject.init();

This makes an ajax request to a jsonrpc server and then evaluates the data json retreived and set's up the wizard.

Thanks in advance, Erik

1

There are 1 answers

0
Erik On BEST ANSWER

It does work,
But becouse of some caching or something the old versions were loaded or something like that.
Restarting my phone solved the problem.