GET -> POST

This commit is contained in:
Piotr Mitros
2012-01-02 08:00:15 -05:00
parent 844d506e46
commit 081bdd92af
4 changed files with 8 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ function ${ id }_load() {
$.each($("[id^=input_${ id }_]"), function(index,value){
submit_data[value.id]=value.value;
});
$.getJSON('/modx/problem/${ id }/problem_check',
postJSON('/modx/problem/${ id }/problem_check',
submit_data,
function(json) {
${ id }_load();
@@ -23,14 +23,14 @@ function ${ id }_load() {
submit_data[value.id]=value.value;
});
$.getJSON('/modx/problem/${ id }/problem_reset', {'id':'${ id }'}, function(json) {
postJSON('/modx/problem/${ id }/problem_reset', {'id':'${ id }'}, function(json) {
${ id }_load();
});
log_event('problem_reset', submit_data);
});
$('#show_${ id }').click(function() {
$.getJSON('/modx/problem/${ id }/problem_show', function(data) {
postJSON('/modx/problem/${ id }/problem_show', function(data) {
for (var key in data) {
$("#answer_${ id }_"+key).text(data[key]);
}
@@ -42,7 +42,7 @@ function ${ id }_load() {
var submit_data={};
$.each($("[id^=input_${ id }_]"), function(index,value){
submit_data[value.id]=value.value;});
$.getJSON('/modx/problem/${ id }/problem_save',
postJSON('/modx/problem/${ id }/problem_save',
submit_data, function(data){
if(data.success) {
alert('Saved');