Page 1 of 1

Periodically call rest service with JS

Posted: Tue May 20, 2014 7:25 am
by Marcel Popescu

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


Periodically call rest service with JS

Posted: Tue May 20, 2014 8:12 am
by Marcel Popescu

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


Periodically call rest service with JS

Posted: Tue May 20, 2014 8:39 am
by Evgene Karachevtsev

Hello Marcel,

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


Periodically call rest service with JS

Posted: Tue May 20, 2014 12:07 pm
by Marcel Popescu

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


Periodically call rest service with JS

Posted: Tue May 20, 2014 12:49 pm
by Evgene Karachevtsev

Have you checked console for any mistakes in your application?


Periodically call rest service with JS

Posted: Tue May 20, 2014 1:40 pm
by Marcel Popescu

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.