Marcel Popescu
Posts: 0
Joined: Sat Feb 08, 2014 5:44 pm

Periodically call rest service with JS

Hi,

I would like to periodically call a rest service after page load, which updates some info on a google map.
I tried to use:
var interval = setInterval(restservice2.execute(), 5000);
at different page events (load, show, etc) but it doesn't work. On page load it only calls the service once.

Thanks,
Marcel

Marcel Popescu
Posts: 0
Joined: Sat Feb 08, 2014 5:44 pm

Periodically call rest service with JS

Solved by running the following JS at restservice2() complete event.
setTimeout("restservice2.execute()",5000);

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Periodically call rest service with JS

Hello Marcel,

Thank you for the update. Let us know if you need any further help.

Marcel Popescu
Posts: 0
Joined: Sat Feb 08, 2014 5:44 pm

Periodically call rest service with JS

Hi Evgene,

Actually I would need some help with the following issue:
I'm struggling to make the spinner disappear from one page.
I have a rest service which has some JS on success event. When I call the service ( which updates some info on a google map) I would like to hide the spinner.
After reading the previous posts I tried:
hideSpinner();
$('.ui-loading div.ui-loader').css('display', 'none');
$(".ui-loading div.ui-loader").css("display", "none");
#ajaxBusy {display: none !important;}
(at service success, on page load, show, etc ...) with no success.

Could you please advise ?

Thanks,
Marcel

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Periodically call rest service with JS

Have you checked console for any mistakes in your application?

Marcel Popescu
Posts: 0
Joined: Sat Feb 08, 2014 5:44 pm

Periodically call rest service with JS

Yes I did. Anyway meanwhile I managed to make it disappear using the following css:
.ui-loading div.ui-loader {
display:none;
}

It is strange because the previously tried options should have been the same in terms of results ...

Thx.

Return to “Issues”