- Posts: 5
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<button class="ui-widget ui-state-default ui-corner-all btn btn-primary" accesskey="p" type="button" onclick="javascript:document.limesurvey.move.value = 'moveprev'; $('#limesurvey').submit();" value="Previous" name="move2" id="moveprevbtn" role="button" aria-disabled="false"><span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-w"></span><span class="ui-button-text">Previous</span></button>
<button class="button" name="move" value="4" type="submit" >Change your answer</button>
We can not help you if you don't give more information.Thomas_ wrote: ....
Unfortunately, it's not working.
...
$(document).ready(function(){ // Hide the index stuff $('#index').hide(); $('.withindex').removeClass('withindex'); });
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ // Remove the onclick from the "previous" button and bind a new click event $("#moveprevbtn").attr('onclick', '').click(function () { document.limesurvey.move.value = $('#thisstep').attr('value') - 2; $('#limesurvey').submit(); }); }); </script>
<p> <button id="back2Steps" type="button">Back 2 Steps</button> </p> <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $("#back2Steps").click(function () { document.limesurvey.move.value = $('#thisstep').attr('value') - 2; $('#limesurvey').submit(); }); }); </script>