API Quick Reference Guide
Demo Mini-Site
Qcodo Hosting
Qcodo Manual Project
QForge
5. Basic AJAX in QForms
<< Hello World Example using AJAX
|
Back to Main
|
Adding a Wait Icon >>
Calculator Example using AJAX
View Source
(Pop Up)
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:
+
-
*
/