diff --git a/index.html b/index.html index 37cad0fe65..e8c98e8d60 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@ $(function() { submit_data[value.name]=value.checked; }); - $.getJSON('/create_account', + postJSON('/create_account', submit_data, function(json) { if(json.success) { @@ -39,7 +39,7 @@ $(function() { submit_data[value.name]=value.value; }); - $.getJSON('/login', + postJSON('/login', submit_data, function(json) { if(json.success) { diff --git a/main.html b/main.html index b90a98e3eb..eac56c4027 100644 --- a/main.html +++ b/main.html @@ -25,7 +25,6 @@ -
diff --git a/problem.js b/problem.js index d58ab7cbe0..b6767cf68e 100644 --- a/problem.js +++ b/problem.js @@ -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'); diff --git a/profile.html b/profile.html index 0cc788af40..7e60afd1ec 100644 --- a/profile.html +++ b/profile.html @@ -17,7 +17,7 @@ $(function() { $("#location_sub").html(''+ ''); $("#change_loc_button").click(function() { - $.getJSON('/change_setting', {'location':$("#id_loc_text").attr("value")}, function(json) { + postJSON('/change_setting', {'location':$("#id_loc_text").attr("value")}, function(json) { $("#location_sub").text(json.location); loc=true; $("#description").html(""); @@ -35,7 +35,7 @@ $(function() { $("#language_sub").html(''+ ''); $("#change_lang_button").click(function() { - $.getJSON('/change_setting', {'language':$("#id_lang_text").attr("value")}, function(json) { + postJSON('/change_setting', {'language':$("#id_lang_text").attr("value")}, function(json) { $("#language_sub").text(json.language); lang=true; $("#description").html("");