Welcome, Guest
Username: Password: Remember me

TOPIC: how to disable the movenext step for a particular question?

how to disable the movenext step for a particular question? 1 month 3 weeks ago #109414

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 177
  • Thank you received: 1
  • Karma: 0
i think when user click button, have 2 functions:submit form and move to next question.
i want to disable the movenext function in particular question.then i add the code as below:
<script>
$(document).ready(function () {
$("button#movenextbtn").unbind("click");
});
</script>
i suppose when user click the button, the value will be submited and won't move to next question. BUT still move.
i have no idea what's the problem.
thanks for any help!
The administrator has disabled public write access.

how to disable the movenext step for a particular question? 1 month 3 weeks ago #109427

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
Default behaviour (from PHP) submit => move next.

I think you can play with javascript to:
Find actual step (allways same for each question)
And do something like this (on doc ready)
<script>
var step=4;
$(document).ready(function () {
$("#movenextbtn").attr("name",'move');
$("#movenextbtn").val(step);
});
</script>
The administrator has disabled public write access.

how to disable the movenext step for a particular question? 1 month 3 weeks ago #109444

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 177
  • Thank you received: 1
  • Karma: 0
i use FF to fix the original code is :
accesskey="n" onclick="javascript:document.limesurvey.move.value='movenext';
is that actual step you mean?
The administrator has disabled public write access.

how to disable the movenext step for a particular question? 1 month 3 weeks ago #109445

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
LS version 1.92, rigth ?

I give you a 2.00 version .....
The administrator has disabled public write access.

how to disable the movenext step for a particular question? 1 month 3 weeks ago #109446

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 177
  • Thank you received: 1
  • Karma: 0
i am using Version 2.00+ Build 131206
The administrator has disabled public write access.

how to disable the movenext step for a particular question? 1 month 3 weeks ago #109448

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
Hi,

Think you can try:
<script>
$(document).ready(function () {
  var step=$("#thisstep").val();
  $("#movenextbtn").val(step);
  $("#movenextbtn").click(function(e){
    e.preventDefault();
    $("name['move']").val(step);
    $("#limesurvey").submit();
  });
});
</script>
Sorry don't remind when we update the navigator.
Last Edit: 1 month 3 weeks ago by DenisChenu. Reason: Move var step=$("#thisstep").val(); in ready
The administrator has disabled public write access.

how to disable the movenext step for a particular question? 1 month 3 weeks ago #109449

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 177
  • Thank you received: 1
  • Karma: 0
is that means this question javascript will not be functional when update to 2.05?
The administrator has disabled public write access.

how to disable the movenext step for a particular question? 1 month 3 weeks ago #109474

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 177
  • Thank you received: 1
  • Karma: 0
these codes doesn't work.
even i set window.location.href="sample.com" to function, still move to next question, i think because it's faster than location.href.
i just temperatory stop the move to function for 1question, it's so hard to do it.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.233 seconds
Donation Image