I have a form with a field which lets the user change the number of results on the page, the plan is that the form is submitted to update the results if they change the page size.
<form id="js-selectionForm" class="simple_form" method="get" action="/knowledge/contaminants.php">
<div class="pad-5">
...
</div>
<div class="pad-5">
...
</div>
<div class="pad-5">
...
</div>
<div class="pad-5">
...
</div>
<div class="pad-5">
<input class="button pad-2" id="submit" type="submit" name="submit" value="Search"/>
<h3 class="text-purple inline-block margin-10-left">
Please select search criteria above </h3>
<label class="right">Page size:
<input class="refreshPage" type="number" name="pageSize" min="1" max="100"
title="The number of results per page - 1 to 100"
value="25"/>
</label>
</div>
My jQuery includes the following;
$('.refreshPage').change(function () {
$("#js-selectionForm").submit();
});
I know this selection works because I have put in console.log statements to check but the form is never submitted. I have used similar code before and it has always worked so I must be doing something wrong here, can anybody help me spot my mistake?