The following code produces the error - only in Firefox. Firebug shows the error -
Ox12f is null
The problem goes away if I remove the code that hides the div on the document load - but I need this. This does work in IE 8.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TestView.ascx.cs" Inherits="Jenzabar.LMS.Portlets.CourseworkPortlet.Views.TestView" %>
<%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
<script type="text/javascript" language="javascript">
// When first loaded, hide the section
$(document).ready(function () {
document.getElementById("divToToggleVisiblity").style.display = "none"; // this is the code that causes the problem
});
function toggleInstructionsHeader() {
if ($("#divToToggleVisiblity").css("display") == "none") {
$("#divToToggleVisiblity").show("slow");
}
else {
$("#divToToggleVisiblity").hide("slow");
}
}
</script>
<div id="divToDoTheToggling" onclick="toggleInstructionsHeader()">
Toggle Below Div
</div>
<div id="divToToggleVisiblity">
<CE:Editor ID="editor1" runat="server" Height="200" AutoConfigure="Simple">
</CE:Editor>
<CE:Editor ID="editor2" runat="server" Height="200" AutoConfigure="Simple">
</CE:Editor>
</div>