I stumbled upon an something when trying to give my students an example of javascript. When adding the onchange="func()" inside of an input tag it changed onchange to Xonchange. The javascript is all escaped like the one below and was typed in the editor.
<input name="inp" onchange="func()">
Any ways to correctly present this would be appreciated.
P.S. the error appears in this version of moodle also because in the example onchange was typed not Xonchange.
This is a security feature to prevent people embedding dangerous Javascript within HTML in public areas like forums.
If you really want to add some scripts like this - turn off your html editor, and enter the text using the format "Plain text".
For example:
<input name="input" onChange="alert(document.cookie);">
If you really want to add some scripts like this - turn off your html editor, and enter the text using the format "Plain text".
For example:
<input name="input" onChange="alert(document.cookie);">
I'm not wanting to add the script it's self to the page just show it to my students to help them get started on their assignment.
In the same page I was also wanting links to other pages. If I'm understanding things correctly the workaround would be to have a seperate example using plain text.
In the same page I was also wanting links to other pages. If I'm understanding things correctly the workaround would be to have a seperate example using plain text.