Dear All I am looking to take a respondent's currently selected (but not yet submitted) choice, perform a mathematical operation on it and then display it to the respondent on the same page as the question, so they can see the result before they submit their answers. The code I am currently using (placed in the HTML view section of a subsequent question that is on the same page) (note: I don't actually attempt to perform the mathematical operation yet as the choice is not being pulled properly - this is merely meant to display their currently selected choice at the moment); Code <p id="test"></p> <script> var myVar = setInterval(myFunction, 2000); function myFunction() { var y = parseInt(${q://QID21/ChoiceNumericEntryValue/1}); document.getElementById("test").innerHTML="The value of y is " + y + "."; } </script> Output *After 2 seconds, "The value of y is NaN." appears on the screen and doesn't change if the value of q:/
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.