Andrew Majskiy
Posts: 0
Joined: Fri Jan 04, 2013 1:31 pm

Get value of service request parameters

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Get value of service request parameters

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

Andrew Majskiy
Posts: 0
Joined: Fri Jan 04, 2013 1:31 pm

Get value of service request parameters

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...

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Get value of service request parameters

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

Helen
Posts: 0
Joined: Wed Aug 28, 2013 8:35 pm

Get value of service request parameters

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

Helen
Posts: 0
Joined: Wed Aug 28, 2013 8:35 pm

Get value of service request parameters

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!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Get value of service request parameters

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

Return to “Issues”