Michael Pierce
Posts: 0
Joined: Mon Apr 22, 2013 12:36 am

Manual executing of service

Is there a way to set the amount of time before you execute a service manually with the code service_name.execute({}); I basically want something to display on my page for about 4 seconds before the service executes which results in a page change on success. I'm using this same service in another area as well so I don't want to mess with the success event I already have setup.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Manual executing of service

Hello.

This should help: http://api.jquery.com/delay/

dale
Posts: 0
Joined: Fri Mar 29, 2013 5:28 pm

Manual executing of service

Hi,

I've seen this code for creating a splash screen and then navigating to a page:

setTimeout(function() {navigateTo ('screen_name');},3000);

Maybe you could put the execute in place of the navigateTo?

I'm very much a beginner, so not sure, just trying to help. ;-)

Dale.

Michael Pierce
Posts: 0
Joined: Mon Apr 22, 2013 12:36 am

Manual executing of service

thanks guys but I tried your method Dale and it didn't work also Igor I tried this line: service_name.execute({}).delay(4000); and it did not work either. Am I writing the code wrong?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Manual executing of service

Please Try to use next code:
code
function execServ () {
service_name.execute({});
}
setTimeout(execServ, 4000);
/code

Return to “Issues”