Issue with a redirect from within a survey

Mehr
1 Woche 3 Tage her - 1 Woche 3 Tage her #183230 von davebostockgmail
COM_KUNENA_MESSAGE_CREATED_NEW
Good afternoon,

Well we finally bit the bullet and upgraded to version 3.17.0 +190402 and having resolved almost all my issues I have one outstanding that I was hoping that some one could help out on ...

It is a redirect to a different page when the next button is pressed in a question..

Here is the script

$(document).ready(function() {

var idnum={TOKEN:TOKEN};

var url='https://newpage.php?token='+idnum;


$('#ls-button-submit').bind('click', function () {
$(location).attr("href", url);
return false;
});

});
</script>


In debug it says there is an error in the JQuery where whatever the token is is unidentified so if the token was "Bob" it says Bob unidentified ... now this used to work in the older version (2.xx)

Can anyone see where this is going wrong?

Thanks for you help in advance

Dave
Last edit: 1 Woche 3 Tage her by davebostockgmail. Begründung: incorrect code

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

LimeSurvey Partners
Mehr
1 Woche 2 Tage her #183233 von tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
Try placing {TOKEN:TOKEN} in the question text to see what is returned.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
5 Tage 8 Stunden her #183364 von davebostockgmail
COM_KUNENA_MESSAGE_REPLIED_NEW
Hi Tony ..

I did that and it returned the token as expected ...

But the error is still showing on the debug page

Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
5 Tage 7 Stunden her #183369 von DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
var idnum="{TOKEN:TOKEN}";

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Folgende Benutzer bedankten sich: davebostockgmail

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
5 Tage 7 Stunden her #183371 von davebostockgmail
COM_KUNENA_MESSAGE_REPLIED_NEW
Thank you Denis ... works like a charm

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha