".
The same techniques
can be made to work with other browsers, including IE and Safari, but
that is left an excersise for the reader.
The 8x8 grid of squares should update themselves. On each update, three squares are changed at random, each with a different color. This demo, although not useful by itself, demonstrates one design pattern for using Brazil for Ajax that works for many types of applications.
|
The contents of the field will be prepended to the table cells. Instead of submitting the form normally, we will submit it via XMLHttpRequest() which will prevent the page from reloading.
alternately, we could submitit normally, and make sure the server returns "204 No Content", which will (in theory) cause the browser to ignore the submission, and not refresh the page content. (This doesn't always work though, the the method used here is more reliable).