5. Basic AJAX in QForms
Calculator Example using AJAX
<< Hello World Example using AJAX
|
Back to Main
|
Adding a Wait Icon >>
View Source
will open in a new window
AJAX Calculator
To show the ease of AJAX in a slightly more complex QForm, we take our
Calculator Example with Validation
from before... and we only change
one word
.
We change the
QServerAction
call to a
QAjaxAction
call, and now, we've created an AJAX-based calculator. Note that even things like validation messages, etc., will appear via AJAX and without a page refresh.
Value 1:
Value 2:
Operation:
+
-
*
/
Calculate