May 2017
Intermediate to advanced
448 pages
10h 10m
English
Sending data to the server often involves the user filling out forms. Rather than relying on the normal form submission mechanism, which will load the response in the entire browser window, we can use jQuery's Ajax toolkit to submit the form asynchronously and place the response inside the current page.
To try this out, we'll need to construct a simple form:
<div class="letter" id="letter-f"> <h3>F</h3> <form action="f"> <input type="text" name="term" value="" id="term" /> <input type="submit" name="search" value="search" id="search" /> </form> </div>
This time, we'll return a set of entries from the server by having our /f handler search for the supplied search term as a substring of a dictionary term. We'll use ...
Read now
Unlock full access