Hi all,
in one of my surveys, I am using an external JavaScript library (to check whether the user input is an IBAN code).
The way I do this is to put in the survey header the following:
where "
Within the question I then add the following script:
Qualtrics.SurveyEngine.addOnload(function()
{
window.timerID = setInterval('var check = IBAN.isValid(document.getElementById("QR~QID38~7").value);console.log(check)',200);
/* Change input method to Enter, with input validation */
document.on("keydown", function(e) {
if (e.keyCode === 13 && check == true) $('NextButton').click();
})
document.on("keydown", function(e) {
if (e.keyCode === 13 && check == false)
{
alert("Bitte geben Sie eine gültige IBAN ein.") ;
}
})
});
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery('#NextButton').hide();
});
The aim of the code block is to call the function every 0.2 seconds to check in real-time whether the input is a valid IBAN code and to allow the user to submit the page, pressing ENTER, only if the code is valid.
All of this worked until two days ago. Now I can't submit the page with ENTER and in the console I get this: "Uncaught ReferenceError: IBAN is not defined at
I would be extremely grateful if anybody helped me to figure this out. Thanks a lot!
Question
Import external JS library not working?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
