Subversion Repositories SmartDukaan

Rev

Rev 35626 | Rev 36598 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35626 Rev 36572
Line 137... Line 137...
137
        type: httpType,
137
        type: httpType,
138
        success: function (response) {
138
        success: function (response) {
139
            // console.log("response"+JSON.stringify(data));
139
            // console.log("response"+JSON.stringify(data));
140
            callback_function(response);
140
            callback_function(response);
141
            formatCurrency();
141
            formatCurrency();
-
 
142
        },
-
 
143
        error: function (xhr) {
-
 
144
            var msg = xhr.responseText || xhr.statusText || 'Unknown error';
-
 
145
            console.error(httpType + ' ' + urlString + ' failed: ' + xhr.status + ' - ' + msg);
-
 
146
            alert('Request failed: ' + msg);
142
        }
147
        }
143
    });
148
    });
144
}
149
}
145
 
150
 
146
function doPostAjaxRequestWithJsonHandler(urlString, json, callback_function) {
151
function doPostAjaxRequestWithJsonHandler(urlString, json, callback_function) {
Line 158... Line 163...
158
        cache: false,
163
        cache: false,
159
        type: httpType,
164
        type: httpType,
160
        success: function (response) {
165
        success: function (response) {
161
            callback_function(response);
166
            callback_function(response);
162
            formatCurrency();
167
            formatCurrency();
-
 
168
        },
-
 
169
        error: function (xhr) {
-
 
170
            var msg = xhr.responseText || xhr.statusText || 'Unknown error';
-
 
171
            console.error(httpType + ' ' + urlString + ' failed: ' + xhr.status + ' - ' + msg);
-
 
172
            alert('Request failed: ' + msg);
163
        }
173
        }
164
    });
174
    });
165
}
175
}
166
 
176
 
167
function doGetAjaxRequestHandler(urlString, callback_function) {
177
function doGetAjaxRequestHandler(urlString, callback_function) {