Re: Error in Compatibility View (IE9)

  •  04-10-2013, 2:31 PM

    Re: Error in Compatibility View (IE9)

    Hi ken,

     

    the example is:

     

    WebForm1.aspx

     

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebCuteEditor.WebForm1" %>

    <!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>

    <script language="javascript" type="text/javascript">

    function OpenBrowser(button) {

    var editor = CuteEditor_GetEditor(button);

    window.showModalDialog('WebForm2.aspx', editor, "dialogWidth:600px;dialogHeight:400px");

    }

    </script>

    </head>

    <body>

    <form id="form1" runat="server">

    <div id="divEditor" runat="server">

    </div>

    </form>

    </body>

    </html>

     

    WebForm1.aspx.vb

    Public

    Class WebForm1

    Inherits System.Web.UI.Page

    Private _oCEDocumentContent As Global.CuteEditor.Editor

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    _oCEDocumentContent = New Global.CuteEditor.Editor

    With _oCEDocumentContent

    .Width = New Unit("100%")

    .SetSecurityGalleryPath("/")

    .SetSecurityFilesGalleryPath("/")

    .SetSecurityFlashGalleryPath("/")

    .SetSecurityImageGalleryPath("/")

    .SetSecurityMediaGalleryPath("/")

    .ShowWordCount = False

    .AutoConfigure = CuteEditor.AutoConfigure.Simple

    .DisableItemList = "InsertDocument"

    .Height = New Unit(250)

    .FrameStyle.Height = Unit.Percentage(100)

    Dim ctrl As System.Web.UI.WebControls.WebControl

    ctrl = Me._oCEDocumentContent.CreateCommandButton("MyAttachActivities", "AttachActivities.gif", "New button")

    ctrl.Attributes("onclick") = "OpenBrowser(this);"

    Me._oCEDocumentContent.InsertToolControl(0, "MyAttachActivities", ctrl)

    End With

    Me.divEditor.Controls.Add(Me._oCEDocumentContent)

    End Sub

    End

    Class

     WebForm2.aspx

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="WebCuteEditor.WebForm2" %>

    <!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>

    <script language="javascript">

    alert(window.dialogArguments); //In compatibility View this is un HTMLTableObject

    </script>

    </head>

    <body>

    <form id="form1" runat="server">

    <div>

    </div>

    </form>

    </body>

    </html>

     

    The error occurs when you select browser mode: Internet Explorer 9 compatibility view and document mode: Internet Explorer 9 standards

     

    Thx!

     

    Filed under:
View Complete Thread