I've also found it necessary to use Javascript from time to time. Using an external .js file seems to be the best way to do this (note that Moodle's HTML editor will strip out what is between the SCRIPT tags, not the SCRIPT tag itself.
One question related to this is why does the HTML editor do the same thing for the STYLE element (i.e. strips out CSS rules)? That doesn't strike me as a security issue...
Text editors
HTML editor is deleting my script
This discussion has been locked so you can no longer reply to it.