More tweaks

Make the AJAX endpoint configurable (this could still be
done better).
Use POST, rather than GET for the AJAX request, so that
we don't have to worry about overly-long equations.
This commit is contained in:
Jacques Distler 2010-02-22 21:50:38 -06:00
parent cb1fe51e84
commit 85e0a2cb10

View file

@ -20,6 +20,7 @@ $(function() {
se_ns = "http://svg-edit.googlecode.com",
htmlns = "http://www.w3.org/1999/xhtml",
mathns = "http://www.w3.org/1998/Math/MathML",
ajaxEndpoint = "../../itex",
editingitex = false,
svgdoc = S.svgroot.parentNode.ownerDocument,
started,
@ -65,7 +66,7 @@ $(function() {
try {
math = svgdoc.createElementNS(mathns, 'math');
// make an AJAX request to the server, to get the MathML
$.get('../../itex', {'tex': tex, 'display': 'inline'}, function(data){
$.post(ajaxEndpoint, {'tex': tex, 'display': 'inline'}, function(data){
math.setAttributeNS(xmlnsns, 'xmlns', mathns);
math.setAttribute('display', 'inline');
var semantics = document.createElementNS(mathns, 'semantics');