TonyS
Posts: 0
Joined: Thu Jun 11, 2015 12:11 pm

Auto refresh

The user will submit a request via my app to an external management system. When the managers of the system quote the request parameters in the db will change and force the elements on the page to display or not depending on their values. However, the page will only check the service when the page is loaded. So my question is "how do it set a timed refresh of the page?"

Thanks

TonyS
Posts: 0
Joined: Thu Jun 11, 2015 12:11 pm

Auto refresh

Better still refresh just the data fed elements?

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

Auto refresh

Hello Tony,

Please use setInterval method for calling services: https://developer.mozilla.org/en-US/d...

TonyS
Posts: 0
Joined: Thu Jun 11, 2015 12:11 pm

Auto refresh

Sorted thanks:)

rabia batool
Posts: 0
Joined: Mon May 30, 2016 6:22 am

Auto refresh

Can you please share example of how to refresh a page when there is new entry for a specific user in database collection?.

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

Auto refresh

You don't need to refresh a page for that, just invoke the service or JS there.

rabia batool
Posts: 0
Joined: Mon May 30, 2016 6:22 am

Auto refresh

i have already called message load service on page load and also when send button click.

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

Auto refresh

Please use "page show" event instead of the "load" for that.
Do you need further assistance?

rabia batool
Posts: 0
Joined: Mon May 30, 2016 6:22 am

Auto refresh

Thank you for your response. I tried by replacing load with page show event but still its not loading for every new message in database in that conversation. It just load when page is loaded and when user click on send button.

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

Auto refresh

The best sollution in that case is: Send push notification, right after create service executes

Return to “Issues”