I have this checkbox:
This is code for checkbox:
<input class="ace ace-switch" data-toggle="tooltip" data-placement="top" value="true" type="checkbox" id="checkBoxId" onclick="switch();" >
On click i want change href(url) and based on that url i hide/show some other element on page.
This is code for onclick event:
<script type="text/javascript">
function switch() {
location.href="../../app/?viewMode=<%= viewMode.equals("presentation")?"full":"presentation" %>"
}
On click href(url) is changed and elements is hide or show but switch image always stay off.
Why?
Aucun commentaire:
Enregistrer un commentaire