G
I would like to execute a single JavaScript command from within a web
service. The command is a mathmatical statement.
I have a web page with some client side logic that does this and I'm
now moving that functionality into a web service.
To clarify - on the UI the user is collecting and entering data and
then it gets stored into the database. Most fields are input but
there are some that are calculated and stored. The calculated fields
use Java Script notation. For example the data collection might have
3 parameters, user inputs P1 and P2 and then a calculated field
storing the larger value. The calculation formula would be "Math.max
($P1$, $P2$)" The dollar signs means run-time substitution.
I can perform the string manipulation to get a statement like
"Math.max(10, 20)". Is there a way to call java to evaluate it and
get the returned value?
The existing UI piece has been in place for a long time so there are
many expressions already specified in Java syntax.
Mike Buchanan
service. The command is a mathmatical statement.
I have a web page with some client side logic that does this and I'm
now moving that functionality into a web service.
To clarify - on the UI the user is collecting and entering data and
then it gets stored into the database. Most fields are input but
there are some that are calculated and stored. The calculated fields
use Java Script notation. For example the data collection might have
3 parameters, user inputs P1 and P2 and then a calculated field
storing the larger value. The calculation formula would be "Math.max
($P1$, $P2$)" The dollar signs means run-time substitution.
I can perform the string manipulation to get a statement like
"Math.max(10, 20)". Is there a way to call java to evaluate it and
get the returned value?
The existing UI piece has been in place for a long time so there are
many expressions already specified in Java syntax.
Mike Buchanan