Spellchecker not working within asp:UpdatePanel and another Panel where the visibility="false"

  •  03-29-2010, 5:45 AM

    Spellchecker not working within asp:UpdatePanel and another Panel where the visibility="false"

    I have embedded the editor into an UpdatePanel and then into another panel where the panel's visibility is false.  But when a user clicks a button to show that panel (and the editor contained within it) the spell checker button returns a javascript error saying "Object doesn't support this property or method"
     
    If I remove the editor from the panel it works fine in the UpdatePanel it just seems to be something to do with changing the visibility of the panel within an UpdatePanel which causes the error to occur.
     
    Does anyone have a work around for this?
     
    Attached is a basic example on how to replicate the problem
     
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
    <%
    @ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
    <%
    @ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <
    head runat="server">
    <title></title>
    </
    head>
    <
    body>
    <form id="form1" runat="server">
     
    <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" />

    <asp:UpdatePanel ID="EditUpdPnl" runat="server">

    <ContentTemplate>

    <asp:Panel ID="TestPnl" runat="server" Visible="false">

    <CE:Editor ID="Editor1" runat="server" />

    </asp:Panel>

    <asp:LinkButton ID="LinkButton1" runat="server" OnClick="ShowPanel">Show</asp:LinkButton>

    </ContentTemplate>

    </asp:UpdatePanel>

    </div>

    </form>

    </body>

    </html>


    And the code behind


    Partial Class _Default

    Inherits System.Web.UI.Page

     

    Sub ShowPanel(ByVal sender As Object, ByVal e As EventArgs)

    TestPnl.Visible = "True"

    End Sub

    End Class

     

     

View Complete Thread