how to replace onChange="this.form.submit(); for ajax page load
Hello I'm trying to replace onChange="this.form.submit(); with a script to get it to work with ajax page load.
- <form id="manufacturers_catalog" action="http://localhost/oscommerce-2.3.3.4_updated/catalog/mobile/catalog_mb.php" method="get">
<select name="manufacturers_id" id="manufacturers_id" data-native-menu="false" size="1" data-theme="a">
<option value="">Please Select Manufacturer</option>
<option value="6">Canon</option>
<option value="4">Fox</option>
<option value="8">GT Interactive</option>
<option value="9">Hewlett Packard</option>
<option value="5">Logitech</option>
<option value="1">Matrox</option>
<option value="2">Microsoft</option>
<option value="10">Samsung</option>
<option value="7">Sierra</option>
<option value="3">Warner</option>
</select>
</form>
<script>
$(function() {
$('#manufacturers_id').change(function() {
$.mobile.changePage('catalog_mb.php', {
type: 'get',
data: $('form#manufacturers_catalog').serialize(),
});
});
});
</script>
It works only once, on the second select change and then it doesn't work again until the result page is reloaded.
What am I missing?
Thank you and kind regards
Rainer