Kal
Posts: 0
Joined: Thu May 22, 2014 11:03 pm

Navigating after x-seconds - wrong info on the docs page

On the docs page: http://devcenter.appery.io/documentat... , the javascript given as:

setTimeout("Appery.navigateTo('page_name',{})" , 1000);

Gives One Warning and One Error. Warning is regarding implicit eval, and error is "missing semicolon". The javascript that actually works is:

setTimeout(function(){Appery.navigateTo('page_name',{});},1000);

Is this browser specific? I am using Safari on OS X.

-Kal.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Navigating after x-seconds - wrong info on the docs page

Hi Kal.

Please use following code:

pre

var onDelay = function(){
//Note: "page_name" should be replaced with your goal page name.
Appery.navigateTo("page_name", {});
};
setTimeout(onDelay, 1000);

/pre

Regards.

Kal
Posts: 0
Joined: Thu May 22, 2014 11:03 pm

Navigating after x-seconds - wrong info on the docs page

Yurii, thanks. But the code I gave above already works. It just inserts the function in-line and is equivalent to the code you gave.

My point was different - you should ask your documentation person to fix the Doc page, as it has the wrong information, and may confuse someone else like it did for me.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Navigating after x-seconds - wrong info on the docs page

Hi Kal.

You are right. These codes are equal. And both should work.

I don't see a problem with code provided by our documentation.

But we will check it and update if need be.

Thanks & Regards.

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Navigating after x-seconds - wrong info on the docs page

I am using the setTimeout on a function with parameter but its not being triggered?

var delinv=$(this).find("[name=btnDeleteInvoice]");

//alert(delinv.text());
delinv.show();

var onDelay = function(delinv){
alert(previnv.text());
delinv.hide();
};

setTimeout(onDelay, 5000);

Return to “Issues”