|
@@ -210,30 +210,31 @@ $(".collect-send").submit(function (e) {
|
|
|
var jsonString = JSON.stringify(formRef);*/
|
|
|
var jsonInfo = $('.collect-send').serializeObject();
|
|
|
var jsonString = JSON.stringify(jsonInfo);
|
|
|
- console.log(jsonString),
|
|
|
+ console.log(jsonString);
|
|
|
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: 'https://ark.cards:8228/send',
|
|
|
- data: jsonString,
|
|
|
- dataType: 'json',
|
|
|
- async: false,
|
|
|
- success: function (data) {
|
|
|
- console.log('送出成功: ' + JSON.stringify(data));
|
|
|
- alert("送出成功");
|
|
|
- },
|
|
|
- beforeSend: function () {
|
|
|
- console.log('beforeSend');
|
|
|
- },
|
|
|
- complete: function () {
|
|
|
- console.log('complete');
|
|
|
- },
|
|
|
- error: function (jqXHR, textStatus, errorThrown) {
|
|
|
- console.log(JSON.stringify(jqXHR));
|
|
|
- console.log("AJAX errr: " + textStatus + ' : ' + errorThrown);
|
|
|
- console.log('送出失敗: ' + jqXHR.responseText);
|
|
|
- }
|
|
|
- });
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: 'https://ark.cards:8228/send',
|
|
|
+ data: jsonString,
|
|
|
+ dataType: 'json',
|
|
|
+ async: false,
|
|
|
+ success: function (data) {
|
|
|
+ console.log('發送成功: ' + JSON.stringify(data));
|
|
|
+ alert("發送成功");
|
|
|
+ location.reload();
|
|
|
+ },
|
|
|
+ beforeSend: function () {
|
|
|
+ console.log('beforeSend');
|
|
|
+ },
|
|
|
+ complete: function () {
|
|
|
+ console.log('complete');
|
|
|
+ },
|
|
|
+ error: function (jqXHR, textStatus, errorThrown) {
|
|
|
+ console.log(JSON.stringify(jqXHR));
|
|
|
+ console.log("AJAX errr: " + textStatus + ' : ' + errorThrown);
|
|
|
+ console.log('送出失敗: ' + jqXHR.responseText);
|
|
|
+ }
|
|
|
+ });
|
|
|
return false;
|
|
|
});
|
|
|
|