Page 1 of 1

Get value of service request parameters

Posted: Wed Feb 13, 2013 11:28 am
by Andrew Majskiy

Hello. How can I get value of service request parameters with help of the javascript? Thanks!


Get value of service request parameters

Posted: Wed Feb 13, 2013 12:48 pm
by Maryna Brodina

Hello! Could you clarify please when you want to get that values? What service and parameters you use?


Get value of service request parameters

Posted: Wed Feb 13, 2013 1:11 pm
by Andrew Majskiy

I have file with services settings.
http://easycaptures.com/fs/uploaded/5...
I use this settings in my services.
http://easycaptures.com/fs/uploaded/5...
And I want to get some value from this settings file with javascript for example in my custom function.
http://easycaptures.com/fs/uploaded/5...


Get value of service request parameters

Posted: Wed Feb 13, 2013 1:41 pm
by Maryna Brodina

You can refer using parameter name just like that RESTSettingsName["valueName"]. In your case it's Settings["api_key"]


Get value of service request parameters

Posted: Mon Sep 09, 2013 7:38 pm
by Helen

I'm having same trouble. I do not know how to reference my 'tour_id' request parameter from WITHIN my Generic Service javascript implementation.

I'd like to use this tour_id parameter in my SQL statement.

For example.... (partial code)....

_____________________________

$t.js_gsvc_local_poi = $t.createClass(null, {

Code: Select all

 init: function(requestOptions) { 
     this.__requestOptions = $.extend({}, requestOptions); 
 }, 

 process: function(settings) { 

     alert(Request['tour_id']); //??? doesn't work 
     alert(Settings['tour_id']); //??? doesn't work 
__________________________________

thanks for any help,

Helen


Get value of service request parameters

Posted: Mon Sep 09, 2013 8:09 pm
by maxkatz

Get value of service request parameters

Posted: Mon Sep 09, 2013 8:25 pm
by Helen

Thanks, this is the answer I was looking for:

"Request parameters you define will be available in settings.data "

So below works...

alert(settings.data['tour_id']);

Is there documentation for this anywhere besides the forum?

Thanks!


Get value of service request parameters

Posted: Mon Sep 09, 2013 8:51 pm
by maxkatz

Right now this post on the forum... we'll add something more comprehensive to the docs.