Java Reference
In-Depth Information
</td>
</tr>
<tr>
<td colspan=”2” class=”submit”>
<input type=”submit” value=”Submit” />
</td>
</tr>
</table>
</form>
</body>
</html>
Exercise 3 Question
If you guessed that this question would be: “Change the answer to Chapter 14's Question 2 using
MooTools, and add error reporting for when an error occurs with the Ajax request” then you won!!
Your prize is… completing the exercise.
Exercise 3 Solution
You guessed it! Synchronous communication!
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
“http://www.w3.org/TR/html4/strict.dtd”>
<html>
<head>
<title>Chapter 15: Question 3 Answer with MooTools</title>
<style type=”text/css”>
.fieldname
{
text-align: right;
}
.submit
{
text-align: right;
}
</style>
<script src=”mootools-1.2.3-core-yc.js” type=”text/javascript”></script>
<script type=”text/javascript”>
var isUsernameTaken;
var isEmailTaken;
function checkUsername_callBack(text, xml)
{
if (text == “available”)
{
isUsernameTaken = false;
}
Search WWH ::




Custom Search