views:

16

answers:

1

I was just wondering what the best online scripting language is to use for "simple" mathematical calculations, like solving for roots in 2nd 3rd or 4th degree polynomials.

For example, creating a little web "applet" like the one found here which inserts the values inputed into the text boxes and inputs them as variables into the "quadratic equation" and solves for two x values.

Is plain JavaScript the best scripting language to use for this? IMO, there's really no need for this to be server side.

+1  A: 

If you're planning to do this in a web page, pretty much your only choice is Javascript anyway. You could write a Java applet, but that's a pain and requires that people install the Java browser plugin.

Pointy
OK, what is the best way to accept user input and then set that equal to a variable?
BOSS
uhh ... you mean set a variable equal to the input I'm guessing. Well, you'd make a page with a form in it, and then set up Javascript event handlers for something like a "Go" button. That'd find the input fields in the form, grab the values, and start computing. You sort-of have to know the basics of HTML and Javascript to get rolling on something like this.
Pointy
Nvmd, bad question lol, I got it. Thanks though.
BOSS