Page 1 of 2
Calling a service within custom Javascript
Posted: Mon May 14, 2012 11:12 am
by Chris2656882
• How does one call a service defined with the builder within a custom javascript/Jquery function?
• What is the notation to do so?
•Also, when creating a service with the builder, how do you reference variables that are only stored within custom JavaScript functions and not within form fields?
Calling a service within custom Javascript
Posted: Mon May 14, 2012 1:13 pm
by maxkatz
code
serviceInstanceName.execute({});
/code
http://help.tiggzi.com/documentation/... (just added this)
Calling a service within custom Javascript
Posted: Mon May 14, 2012 1:25 pm
by Chris2656882
Also, when creating a service with the builder, how do you reference variables that are only stored within custom JavaScript functions and not within form fields?
Calling a service within custom Javascript
Posted: Mon May 14, 2012 1:26 pm
by Chris2656882
Also, when creating a service with the builder, how do you reference variables that are only stored within custom JavaScript functions and not within form fields?
Calling a service within custom Javascript
Posted: Mon May 14, 2012 1:37 pm
by maxkatz
You would access them in a standard way (if visible), there is nothing special you need to do.
Calling a service within custom Javascript
Posted: Wed May 16, 2012 8:03 pm
by Chris2656882
When calling a service via custom javascript, how can one override the default input parameter values?
Calling a service within custom Javascript
Posted: Wed May 16, 2012 8:32 pm
by maxkatz
You can use mapping to set or overwrite any default input parameters values. Another option is to use a Generic Service: https://getsatisfaction.com/tiggzi/to.... You should have access to request params from: this.__requestOptions. One thing to note is that you will still need to map these request parameters, otherwise they will not appear in the requestOptions object.
Calling a service within custom Javascript
Posted: Sat May 24, 2014 3:15 pm
by RobertJay
How can that be modified so that I can execute some code when execution is successful. Or even better, http://snippees.com/viewSnip.php?snip... looks like great code - it it can be tweaked to work.Thanks.
Calling a service within custom Javascript
Posted: Sat May 24, 2014 3:38 pm
by Illya Stepanov
Hi Robert,
You can control the service success event:
:: http://devcenter.appery.io/documentat...
Calling a service within custom Javascript
Posted: Sat May 24, 2014 3:41 pm
by RobertJay
I've been there a dozen times and do not see how I can modify Max's code to control the success event. Can you please take a screenshot of what I am missing. Thank you.