The question is specifically about the Captive Network Assistant.
I have tried using vanilla JavaScript,
<form action="">
<select name="test" onchange="this.form.submit()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</form>
As well using jQuery, in case there was a browser incompatibility issue.
$('select').on('change', function () {
$(this).closest('form').submit();
});
However, none of them work and Captive Portal issues are not an easy cookie to debug. Is there a known solution?
Your code looks fine. You probably want to fill in the
action
attribute of your form and possibly use themethod
andenctype
attributes as well.Here is a working copy of your code on jsFiddle
As i remember
submit()
method doesn't work properly in jQuery.Try using JavaScript:
document.getElementById('ID').submit();
I had similar problem but this solved everything, so hole it helps You.