First off when the below is run it properly sends the parameter to the GP Service and the python script behind the scenes functions properly...
BUT I am not getting anything back or anything written to the console. I do not even get the alert to fire in the .execute function.
No errors in the console....Im puzzled.
I am definitely Synchronous
I have a .net c# webpage that I am clicking a button as you can see below. Using a window.JSControlller to get to my JS Function.....
BUT I am now getting an error relating to the LANG which I think I have referenced correctly in the JS File...
.ASPX PAGE
<asp:Button ID="btnGISPush" runat="server" OnClientClick="window.JsController.btnGISPush_Click()" Text="GIS Push" CausesValidation="true" /><br />
ENTIRE JS PAGE
I added the requires for dojo lang....but nothing happening and no alerts from withing the function and not err going to console...hmmmmm
require(["dojo/_base/lang"], function(lang){ // lang now contains the module features});
require([
"esri/tasks/Geoprocessor", "dojo/_base/lang"
], function (Geoprocessor, lang) {
"use strict";
var gpUrlJSON ="https://xxxx.gov/arcgis/rest/services/Test/createJSON/GPServer/createJSON";
var gpJSON = new Geoprocessor(gpUrlJSON);
window.JsController = {
btnGISPush_Click: function () {
var HistoricUser = document.getElementById(JSONstring).value;
alert("Parameter being passed: " + HistoricUser);
var params = {
request: HistoricUser
};
gpJSON.execute(params, lang.hitch(this, function (jobInfo) {
var jobid = jobInfo.jobId;
alert("jobId stringify: " + JSON.stringify(jobid));
console.log("jobId: " + jobid);
}),
function (err) {
console.log("I got error with job execution")
console.log(err);
}
);
}
};
});