Adding JavaScript in Result
-
Hello,
I’m having issues adding JavaScript code in the result section (I’m trying to calculate a number on base of the actual date and show it by changing the value of a span with a certain ID).
But instead of performing the JavaScript code (which works on a normal .html site), the result only shows the code like normal text.
So I tried to add a button and perform the JavaScript from the site the quiz is embedded in.
`<button onclick=”calc()”>click here</button>
But it doesn’t save the onclick-action, so the button does nothing.Moreover, it seems that there is no possibility to put an ID for a <p>. The id gets deleted as soon as I save the changes.
‘<p id”something”>..</p>Is there a way to add some JavaScript in the result section? Or redirect to another page or add a functional button or something else that solves my problem :/
The best solution for me would be to immediately show the new value of the span when the result page is shown.
I hope, I could describe my problem well enough since English isn’t my mother tongue.
Kind regards
hegeThe page I need help with: [log in to see the link]
- The topic ‘Adding JavaScript in Result’ is closed to new replies.