Form Plugin ajaxSubmit and just one element event
I'd much much appreciate some help with the form plugin. I'm new to
jqery.
I have a double drop down box with select options and two radio
buttons . The two radio buttons are a filter.
The first Form "#TheMake" has a list drop down options that chooses
a make (of helicopter) and when it changes the second drop down box
"#TheModel" shows the models made by that manufacturer. Here's the
html
<form id="TheMake" name="makes" action="/wordpress/wp-content/themes/
copters-5/searchbox/models_form.php" method="get">
<label for="radionews">News</label>
<input id="radionews" class="radio" type="radio" name="section"
value="news" checked="checked" />
<label for="radiosales">Sales</label>
<input id="radiosales" class="radio" type="radio" name="section"
value="sales" />
<br />
<select id="which" name="make">
<option value="default">
Choose a make</option>
<option id="west" value="westland">AgustaWestland</option>
<option value="bell">Bell</option>
<option value="eurocopter">EuroCopter</option>
<option value="md">MD Helicopters</option>
<option value="schweizer">Schweizer</option>
</select>
<input type="submit" id="go" value="Go"/>
</form>
<div id="replace">
<form id="TheModel" name="models" action="" method="post">
<select id="selection2" name="model">
<option value="empty">
and choose a model</option>
</select>
<input id="modelgo" type="submit" value="Go" />
</form>
</div>
I'm using the Form plugin and ajaxSubmit. To deal with msie I have a
variable that uses "click" for explorer and "change" for other
browsers. (a solution found via google)
var evt = $.browser.msie ? "click" : "change";
$('#TheMake').bind(evt, function () {
$(this).ajaxSubmit(options);
});
My problem is that the radio buttons are now not working in Internet
Explorer (not in ie6 anyway) - well they sort of work but the "blob"
to indicate selection has become invisible. I think this is because
the radio buttons are now being effected by the click event .
I really just want the ajax to repopulate the second form when a drop
down is selected in the first form. Changing the radio buttons
shouldn't be an event that triggers any ajax callback.
So my questions are:
Is it possible to have an change / click event that only fires when
the user selects a drop down? But not when the user changes a radio
button?
Is there another way to make sure that the radio buttons work properly
in msie ?
I hope my question isn't too dumb. I suspect the answer is very
simple. Many thanks to anyone who can help me.
Hugh