From 85a296480654f1f78a304964cba84ae299546cb0 Mon Sep 17 00:00:00 2001 From: Ernie Park Date: Tue, 7 Feb 2012 12:24:30 -0500 Subject: [PATCH] fix enter on submit for calculator, needs styling --- main.html | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/main.html b/main.html index 704753ca77..ad1d7bd2de 100644 --- a/main.html +++ b/main.html @@ -69,20 +69,22 @@
- - - +
+ + + +
+Students won't know what parallel means at this time. +Complex numbers aren't well tested in the courseware, so we would prefer to not expose them. +If you read the comments in the source, feel free to use them. If you run into a bug, please +let us know. But we can't officially support them right now. +-->
Suffixes :  %kMGTcmunp
Operations :  ^ * / + - ()
Functions :  sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs
Constants :  e
@@ -103,7 +105,8 @@ $(function() { // Calculator $(function() { - $("#calculator_button").click(function(){ + $("form#calculator").submit(function(e){ + e.preventDefault(); $.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")}, function(data){ $("#calculator_output").attr("value",data.result);