Well this has been bugging me for a while - every time I tried to insert Javascript into the moodle html editor it never worked. You could embed content with <object> or <iframe> tags....but I'm against that because of display issues on different browsers.
Well I've finally found the simple solution - you need an extra identifier in your javascript.
<script type="text/javascript" language="javascript">
//<![CDATA[
your code here....
//]]>
</script>
All you need to do is add the code marked in yellow above, purge your moodle cache and voila! Your javascript now works inside the moodle html editor!
Important Note: You need to try this using "standard web forms". This option can be changed from your profile settings.
Thank you... I've been looking for this for a while. It works, and it solves a lot of problems.
ReplyDeleteExactly what i was looking for...
ReplyDeleteThank you very much!