Commit d045d1ae by Lyla Fischer

removed error logs from the javascript and added curly braces

parent 54026886
......@@ -10,18 +10,16 @@ function ${ id }_load() {
$.each($("[id^=input_${ id }_]"), function(index,value){
if (value.type==="radio" || value.type==="checkbox"){
if (value.checked) {
console.log("adding a radio or checkbox value");
if (typeof submit_data[value.name] == 'undefined')
if (typeof submit_data[value.name] == 'undefined'){
submit_data[value.name]=[]
}
submit_data[value.name]+=value.value;
}
}
else{
console.log("adding a standard value");
submit_data[value.id]=value.value;
}
});
console.log(submit_data)
postJSON('/modx/problem/${ id }/problem_check',
submit_data,
function(json) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment