Trouble setting up HTMLArea on new page

Trouble setting up HTMLArea on new page

by Matthew Pruett -
Number of replies: 1
I'm currently designing a custom module for the counselors at my college, and they need to use the HTMLArea editor for some of the stuff they will be doing. I added it to the pages I'm building via a combination of print_textarea() and use_html_editor(). This works for Firefox users, but IE users just see a normal textarea with the help button for the editor.

Does anyone know why this could be happening? I suspect it's something to do with the way that IE renders javascript, but the HTMLAreas on other Moodle pages show up fine.
Average of ratings: -
In reply to Matthew Pruett

Re: Trouble setting up HTMLArea on new page

by Matthew Pruett -
Sorry for the double post, but I figured out what was going on.

Firefox and Internet Explorer run JavaScript differently. One of the differences lies in the way they handle functions. JavaScript functions can be called anywhere in Firefox, even before they are defined. However, Internet Explorer requires that functions be defined before they can be called.

Basically, I had my call to use_html_area() before my call to print_textarea().