I need your help.
How can I make a function to check and see if a single or combination of selections has been made in any of the 3 boxes and alert me back with any of the resultant combination of messages below:
if a single selection has been made in any of the 3 dropdown boxes: "searching the database by [selectbox] only"
if a selection has been made in any 2 drop down boxes "searching the database by [selectbox] and [selectbox]
if a selection has been made in all 3 drop down boxes "searching the database by [selectbox], [selectbox], and [selectbox]
here is the setup:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
Firtsname (x)<br>
<select id="firstname">
<option value=""></option>
<option value="John">John</option>
<option value="Jacob">Jacob</option>
<option value="Nancy">Nancy</option>
<option value="Loretta">Loretta</option>
</select>
<br>
Lastname (y)<br>
<select id="lastnname">
<option value=""></option>
<option value="Pearson">Pearson</option>
<option value="Black">Black</option>
<option value="Scott">Scott</option>
<option value="Murray">Murray</option>
</select>
<br>
Age (z)<br>
<select id="age">
<option value=""></option>
<option value="30">30</option>
<option value="25">25</option>
<option value="45">45</option>
<option value="39">39</option>
</select>
<br>
<br>
<input type="button" value="testit">
</body>
</html>