Welcome, Guest
Username: Password: Remember me

TOPIC: Alert and button "moveprev" works on 2.00 but not working on 2.05

Alert and button "moveprev" works on 2.00 but not working on 2.05 7 months 2 weeks ago #105879

  • DWS
  • DWS's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 50
  • Karma: 1
Hi,

I used to put alerts for some cases that mandatory doesn't fit ok for my needs. The code is
<script type="text/javascript" charset="utf-8">
var rp1="{INSERTANS:198784X2X4410}";
function validation()
{ if (rp1 > 12)    { alert("Alert....");
        document.limesurvey.move.value = 'moveprev';
        document.limesurvey.submit();     } }
setTimeout("validation()",250);
</script>

and works fine on 2.00 but not on 2.05. The alert goes on and on and on... and don't go back to previous page.

Any idea about is not working?

Thanks.
Regards.
The administrator has disabled public write access.

Alert and button "moveprev" works on 2.00 but not working on 2.05 7 months 2 weeks ago #105921

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6429
  • Thank you received: 839
  • Karma: 249
Hi,

There an update of 'navigation' system in 2.05. This update alow to go previous i any condition (even with 'text browser').

Just use $("#moveprev").click(); I think it do the trick.
The administrator has disabled public write access.
The following user(s) said Thank You: DWS

Alert and button "moveprev" works on 2.00 but not working on 2.05 7 months 2 weeks ago #105984

  • DWS
  • DWS's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 50
  • Karma: 1
Hi Denis, thanks for your help


I'm sorry but $("#moveprev").click(); doesn't do the trick, it does the same as document.limesurvey.move.value = 'moveprev';

any suggestion?
The administrator has disabled public write access.

Alert and button "moveprev" works on 2.00 but not working on 2.05 7 months 2 weeks ago #105996

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6429
  • Thank you received: 839
  • Karma: 249
Hi,
$("#moveprevbtn").click();
or
$("#defaultbtn").val('moveprev').click();
Tested OK

BUT : you need to accept "Allow prev" in survey settings (else it was set to default in Expression Manager (i think).

But one question : why don't use Existing included LimeSUrvey function (validation etc ...)
The administrator has disabled public write access.

Alert and button "moveprev" works on 2.00 but not working on 2.05 7 months 2 weeks ago #105997

  • DWS
  • DWS's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 50
  • Karma: 1
Hi,

both methods works fine.

We apply in a multi-numeric question to validate the result of each of the sub-questions. So I can leave the question as non required but manage the values of each sub-question.

Also I do to learn more about programming and enlarge the possibilities of Limesurvey.

Thank for so much your help.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.155 seconds
Donation Image