Hi all,
I have an issue displaying a chart that is drawn in javascript- it works on the first question block, but not in subsequent blocks & questions in preview mode, and via anonymous link. The charts display fine when the questions/ blocks are previewed in isolation within the editor. I've attached the qsf- does anybody have experience with this issue?
Many thanks!
Solved
Javascript displaying adjustable chart on first question, but not subsequent questions?
Best answer by NiC
Hi @cjohnburke,
So the issue you are facing here is due to duplicate id's
Adding the following code in addOnUnload function for every question you have the chart code on should solve your problem:
`jQuery("#myChart").remove(); `
Attached the updated qsf i tried the code and charts are working on
View originalSo the issue you are facing here is due to duplicate id's
Adding the following code in addOnUnload function for every question you have the chart code on should solve your problem:
`jQuery("#myChart").remove(); `
Attached the updated qsf i tried the code and charts are working on
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.