Lim Samantha
Posts: 0
Joined: Wed Jun 11, 2014 6:50 am

Auto page refresh

Hi, how do we auto refresh our chat screen? for example, when there is a new text by someone who is also using this app, the page will be refresh automatically instead of us clicking on the 'update' button. Image

please help, thank you!

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

Auto page refresh

Hi Lim,

It's not good way to refresh all chat page.

You just need to update needed data.

For example in Appery.io you can do it with invoking datasource which will update your messages.

Also if after these facts you still want to update the page you can use following code:

  1. Common way:

    pre

    window.location.reload();

    /pre

  2. JQM specific:

    pre

    //Note you should replace "Screen20" with page name you need to reload.
    Apperyio.navigateTo("Screen20", {reloadPage: true, transition: 'none'})

    /pre

    Regards.

Lim Samantha
Posts: 0
Joined: Wed Jun 11, 2014 6:50 am

Auto page refresh

Hi, thanks for the advice.
How do i invoke datasource that will update my messages then? as i have already invoked datasource in my 'send' button.

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

Auto page refresh

Hi Lim,

As i understood, you have "send" message service and invoke this service on "send" button click.

In this case you need:

1 Open your page in data mode.

2 Open bottom "EVENTS" panel.

3 Select your "send" datasource and add "success" event hander with action "invoke service" and select then "messages" list service. http://prntscr.com/3yj6y8/direct

Regards.

Lim Samantha
Posts: 0
Joined: Wed Jun 11, 2014 6:50 am

Auto page refresh

Hi,
I do not have any "success" event handler. Where can i find it? Image

Lim Samantha
Posts: 0
Joined: Wed Jun 11, 2014 6:50 am

Auto page refresh

Hi, it works.
Thank you so much!

Return to “Issues”