Closed (works as designed)
Project:
Closed Question
Version:
6.x-2.1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Aug 2011 at 18:05 UTC
Updated:
1 Sep 2011 at 19:04 UTC
Is there any way to include a javascript snippet in the feedback options? In particular, I would like to hide/show certain css elements depending on whether or not the user responded correctly. I tried enclosing it in the feedback tag of the question XML using a <script> tag, but that didn't work. Any suggestions or alternate solutions would be appreciated.
Thanks for an amazing module, by the way!
Comments
Comment #1
jvdkolk commentedScript-tags can bring serious security issues I think.
Can you solve your problem with this - brand new - feature: http://drupal.org/node/1231310#comment-4905860?
Comment #2
HylkeVDS commentedJavascript certainly is a security risk, so it depends on how well you trust your teachers.
You can add the "script" tag to the long list in XmlLib.inc.php, that way ClosedQuestion won't cut it out. If the text filters also do not remove it then it should then just work.
Comment #3
spazfoxThanks for the suggestion. Adding the "script" tag to XmlLib.inc.php did not work for me, but I was able to do a little work around (that does not compromise the security of this module as much) by using the insert_block module to include blocks that contain the relevant javascript code as needed.