Hello all,
I am trying to have certain parts of a form hidden unless a user selects a specific option from a drop down menu.
So far, I have used jquery and reached a point where it is hidden when the page loads, but appears no matter which option is selected from the menu.
I would like it also to hide again if a different option is selected, and the other options form will show.
I think I am just about there, but maybe making some small errors (i hope). Any help would be appreciated.
Here is what I have so far. Thanks!
<label for="subject">Subject:</label>
<select id="subject" name="subject" size="1">
<option>Select One</option>
<option>General Question/Comment</option>
<option value="sched">Schedule a Multimedia Pickup</option>
<option>Payments/Billing</option>
<option>Computer Service</option>
<option value="mmserv">Multimedia Service</option>
<option>Forensic Service</option>
<option>Other</option>
</select>
<p id="schedule">
<label for="tapeQty">How many tapes do you have?</label>
<input type="int" id="tapeQty" name="tapeQty" /><br />
</p>
$(document).ready(function()
{
$('p#schedule').hide();
$('#subject').change(function()
{
var val = $('sched :selected').val();
$('p#schedule').slideDown('slow');
});
});