Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

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 2 years 4 months ago #105879

  • DWS
  • DWS's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 2
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 2 years 4 months ago #105921

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9264
  • Thank you received: 1321
  • Karma: 383
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.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
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 2 years 4 months ago #105984

  • DWS
  • DWS's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 2
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 2 years 4 months ago #105996

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9264
  • Thank you received: 1321
  • Karma: 383
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 ...)
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

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

  • DWS
  • DWS's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 2
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.244 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form