-
Notifications
You must be signed in to change notification settings - Fork 0
/
gaeprocess.js
35 lines (35 loc) · 1.18 KB
/
gaeprocess.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function submitData2GAE(formData){
alert('formData='+JSON.stringify(formData));
jQuery.ajax({
type : 'POST',
url : 'http://contactmgr.loc/site/yii2curltest',
data : formData,
dataType : 'json',
success : function(response) {
var mystr = JSON.stringify(response);
console.log(response);
console.log(mystr);
alert(mystr);
//return response;
},
error : function(e) {
alert('Error: ' + e);
//return null;
}
});
}
function gaeDecisionTreeSubmitFormFunction(formId, formFolder, scriptName){
jQuery.ajax({
type : 'POST',
//url : '../../forms/'+formFolder+'/decisiontreegae.php',
url : '../../forms/'+formFolder+'/'+scriptName,
data : 'formId=' + formId,
dataType : 'json',
success : function(response) {
submitData2GAE(response);
},
error : function(e) {
alert('Error: ' + e);
}
});
}