Nicklas
Posts: 0
Joined: Thu Jul 03, 2014 8:51 am

How to update page automatically?

I want a page to refresh automatically every 60 sec. Can some one show me a javascript for that?
Thanks!

Nicklas
Posts: 0
Joined: Thu Jul 03, 2014 8:51 am

How to update page automatically?

Or actually invoke service after every 60 sec

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

How to update page automatically?

Hi Nicklas,

setTimeout(function()
{
Do something here. . .
},
miliseconds of 60sec here. . .
);

Goodluck,

Nicklas
Posts: 0
Joined: Thu Jul 03, 2014 8:51 am

How to update page automatically?

Thanks!
But What do I need to put in to "Do something here"?

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

How to update page automatically?

Hi Nick,

type the service that you want to execute, for example:

sampleService.execute();

Goodluck,

Mark Wong
Posts: 0
Joined: Sat Feb 14, 2015 7:47 am

How to update page automatically?

If you mean refresh is invoking service, such as list service then,
code
var renew = setInterval(function()
{Service.execute({}); }, 60000);
/code
/* Replace 60000 milliseconds(60 secs) to How LONG you want /
/ Replace "Service" to your own service trying to refresh */

http://stackoverflow.com/questions/72...
setTimeout only execute once after a period of time you've set.

Nicklas
Posts: 0
Joined: Thu Jul 03, 2014 8:51 am

How to update page automatically?

Thanks! And where could I Run this script? LoadPage?

Nicklas
Posts: 0
Joined: Thu Jul 03, 2014 8:51 am

How to update page automatically?

Thanks! Works perfect!

jmd2004
Posts: 1
Joined: Wed Jan 28, 2015 7:06 pm

How to update page automatically?

how can i refresh the label? For example i would like my web service to run every 5 seconds and then automatically change the label with one of the values.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How to update page automatically?

Hello,

Please use setInterval to run your service each 5 seconds, as Mark said above.:
prevar renew = setInterval(function(){
Service.execute({});
}, 5000);/pre

Return to “Issues”