I have a checkbox inside a label, like this:
<label class="css-label" for="iagree">
<input type="checkbox" title="I accept Terms and Privacy Policy" name="iagree" id="iagree">
I accept <a href="terms-of-use">Terms</a> and <a href="privacy">Privacy Policy</a>
</label>
Its purpose is to check the checkbox
if the label
is clicked and also I want to show the label text after the checkbox. This works impeccably for all browsers, except Opera Mini, where it also works well, but annoyingly it reloads the page. How can I prevent page reload on checkbox/label click on Opera Mini for the current structure?
Opera Mini do not reload your page, it just make a request to the transcoding server to get new page state with a checked checkbox. Opera Mini do not process the page, it get result of transcoding server in OBLM (Opera Binary Markup Language) and just show it on your screen.
Any time the state of the document changes — any time a repaint or reflow needs to occur — Opera Mini must make a request to the transcoding server.
From Opera Mini FAQ
So reloading the page is true Opera Mini behavior for changing checkbox, radio or select states.
More info about OBLM and how Opera Mini works
P.S.
have a checkbox inside a label, like this:
<label class="css-label" for="iagree">
I accept <a href="terms-of-use">Terms</a> and <a href="privacy">Privacy Policy</a>
</label>
There is no checkbox in your label in code example.