[jQuery] Excel-like formulas for text boxes
I only used the 'lang' attribute because it was going to be unused in
the project I'm doing for work. There's a variable defined at the top
of xlforms.js named FORMULA_ which contains the attribute that stores
the formula. Right now it says var FORMULA_ = "lang"
I then use an xpath expression in jquery to find all elements with
that attribute:
xpath = "//[@"+FORMULA_+"]";
$(xpath).each(function(i) {
evalFormula(this.lang, this);
});
I fixed a few more things to account for bugs I ran into during
testing, and I still need to wrap the whole thing in a jQuery plugin
to make it a bit more efficient and user-friendly (ie, you should only
have to initialize the environment with the function call, and pass it
the global settings such as the FORMULA_ var).