jQuery in Action
Making GET and POST requests
243
<html>
<head>
<title>Welcome to The Boot Closet™</title>
<link rel="stylesheet" type="text/css" href="boot.closet.css">
<script type="text/javascript"
src="../../scripts/jquery-1.2.1.js"></script>
<script type="text/javascript"
src="jquery.jqia.selects.js"></script>
<script type="text/javascript">
$(function(){
$('#styleDropdown')
.change(function(){
var styleValue = $(this).val();
$('#detailsDisplay').load(
'getDetails.jsp',
{ style: styleValue }
);
adjustColorDropdown();
})
.change();
$('#colorDropdown')
Listing 8.6
The Boot Closet page augmented with cascading dropdowns
Figure 8.6 Selecting a style enables the color dropdown (top), and selecting a color enables the
size dropdown (bottom).
size dropdown (bottom).