Function within Script Include is not working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2017 01:39 AM
Hello All,
I know this is very simple code in server side script but why it is not working I am very amaze.. .
gs.print('I am running '+ this._gettest('da','Hello Sir'));
function _gettest(target,query) {
gs.print(target + query);
}
Thanks all !!
Regards,
SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2017 05:17 AM
Please keep it simple when you are learning Try this code first, If it works then you expand code.
Just add a single function in your script include.
maintest: function() {
gs.log("Inside maintest function of Script include");
return "my response";
},
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2017 02:12 AM
This can be in the script include function, gs.log('I am running '+ this._gettest('da','Hello Sir'));
you can write after the script include function exclusively,
_gettest: function (target,query) {
gs.log(target + query);
}
try with this.