Title: Adding JavaScript in Result
Last modified: October 3, 2017

---

# Adding JavaScript in Result

 *  Resolved [hegedex](https://wordpress.org/support/users/hegedex/)
 * (@hegedex)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/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
    hege
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-javascript-in-result%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [fatcatapps](https://wordpress.org/support/users/fatcatapps/)
 * (@fatcatapps)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/adding-javascript-in-result/#post-9572193)
 * Hello there,
 * We have intentionally applied the filter for JavaScript and HTML because most
   of our users are code novices, and we don’t want them breaking the quiz.
 * Currently there is no easy way to disable the filter. But if you purchase the
   premium version of the plugin, then you will have the option to redirect to a
   specific URL based on the points scored on the result or the result personality
   type, where you can add the desired code to that specific page URL.
 * Let us know if you have any other questions.
 * Thanks.
 *  Plugin Author [fatcatapps](https://wordpress.org/support/users/fatcatapps/)
 * (@fatcatapps)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/adding-javascript-in-result/#post-9593687)
 * Hello there,
 * It’s been a few days since we replied last. We just wanted to make sure that 
   your issue got resolved or you had any other queries. I would like to inform 
   you that I will mark this thread as resolved in a few days if we do not get a
   reply back from you within a few days.
 * Let us know if you have any other questions.
 * Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding JavaScript in Result’ is closed to new replies.

 * ![](https://ps.w.org/quiz-cat/assets/icon-256x256.gif?rev=2922074)
 * [Quiz Cat - WordPress Quiz Plugin](https://wordpress.org/plugins/quiz-cat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quiz-cat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quiz-cat/)
 * [Active Topics](https://wordpress.org/support/plugin/quiz-cat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quiz-cat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quiz-cat/reviews/)

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [result](https://wordpress.org/support/topic-tag/result/)

 * 2 replies
 * 2 participants
 * Last reply from: [fatcatapps](https://wordpress.org/support/users/fatcatapps/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/adding-javascript-in-result/#post-9593687)
 * Status: resolved