5. Basic AJAX in QForms
Hello World Example using AJAX
Back to Main
Calculator Example using AJAX >>
will open in a new window
Hello World, Revisited
This example revisits our original Hello World example to show how you can easily change a postback-based form and interactions into AJAX-postback based ones.
Whereas before, we executed a
on the button's click, we have now changed that to a
. Everything else remains the same.
The result is the exact same interaction, but now performed Asynchronously via AJAX. Note that after clicking the button, the page doesn't "refresh" -- but the label's contents changes as defined in the PHP method
Click the button to change my message.