Switch over to using the inputtype ajax handler for chemical input.

This commit is contained in:
Diana Huang
2013-03-05 17:04:23 -05:00
parent 7af36eb633
commit 1aa3580dcb
5 changed files with 47 additions and 48 deletions

View File

@@ -11,9 +11,12 @@
}
prev_id = "#" + this.id + "_preview";
preview_div = $(prev_id)
preview_div = $(prev_id);
$.get("/preview/chemcalc/", {"formula" : this.value}, create_handler(preview_div));
url = $(this).parents('.problems-wrapper').data('url');
input_id = $(this).data('input-id')
Problem.inputAjax(url, input_id, 'preview_chemcalc', {"formula" : this.value}, create_handler(preview_div));
}
inputs = $('.chemicalequationinput input');