GET -> POST
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
</script>
|
||||
<script type="text/javascript" src="/static/lib/mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -17,7 +17,7 @@ $(function() {
|
||||
$("#location_sub").html('<input id="id_loc_text" type="text" name="loc_text" />'+
|
||||
'<input type="button" id="change_loc_button" value="Change" />');
|
||||
$("#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('<input id="id_lang_text" type="text" name="lang_text" />'+
|
||||
'<input type="button" id="change_lang_button" value="Change" />');
|
||||
$("#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("");
|
||||
|
||||
Reference in New Issue
Block a user