Resource erases my javascripts when saving

Resource erases my javascripts when saving

by Cristina Berisso -
Number of replies: 1

Has anyone encountered the problem of javascripts placed inside a resource page being completely erased at saving the resource after editing.

I want to use a simple javascript that opens a link (located in my resource file) on a new smaller window. The script used to run perfectly fine in Moodle 1.6, but now when transferring to the latest 1.9, the javascript disappears leaving just the beginning and closing tags of the script.

Is there a way to preclude the Resource module to erase javascripts? Is there any setting that the administrator has to check (or un-check?) Is there a work around. Any prompt help will be greatly appreciated... hundreds of resources have to be ready for spring semester 2009!

Thank you for any help/guidance.

Cristina Berisso

Average of ratings: -
In reply to Cristina Berisso

Re: Resource erases my javascripts when saving

by Cristina Berisso -

Hello everyone,

I just found the answer to my question in a posting by Mauno Korpelainen. He explains that the solution to preclude the editor from erasing the javascript is: "to disable editor from your user profile: Click your name - Edit profile - and change "When editing text" - Use standard web forms and click update profile."

Sorry for the posting, I should have looked more carefully in the forum before sending the question out... Hope this answer may help some other users with the same issue.