165 dataType: 'json', |
165 dataType: 'json', |
166 url: url, |
166 url: url, |
167 cache: false, |
167 cache: false, |
168 data: data, |
168 data: data, |
169 type: 'POST', |
169 type: 'POST', |
170 success: function(data, status, xhr) { |
170 success: function(data) { |
|
171 if (data.error) { |
|
172 console.log('update: ' + data.msg); |
|
173 alert('Fout: ' + data.msg); |
|
174 } else { |
|
175 console.log('update: success'); |
|
176 } |
171 }, |
177 }, |
172 error: function(jqXHR, textStatus, errorThrown) { |
178 error: function(jqXHR, textStatus, errorThrown) { |
173 } |
179 } |
174 }); |
180 }); |
175 }); |
181 }); |