[CLOSED] Problem with HtmlEditor and showModalDialog

  1. #1

    [CLOSED] Problem with HtmlEditor and showModalDialog



    hi,
    I have a page with a HtmlEditor control.When I use window.showModalDialog to pop up this page,I found the HtmlEditor can not edit.

    Page1.aspx
    <body>
        <form id="form1" runat="server">
        
            <ext:ScriptManager ID="ScriptManager1" runat="server" />
            <ext:HtmlEditor ID="txtHtmlEditor" runat="server"></ext:HtmlEditor>
        
    
        </form>
    </body>
    Page2.aspx
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        
              <ext:ScriptManager ID="ScriptManager1" runat="server" />
              <ext:Button ID="btnPopup" runat="server">
                      <AjaxEvents>
                            <Click OnEvent="btnPopup_Click"  ViewStateMode="Include"/>
                        </AjaxEvents>
              </ext:Button>
        
    
        </form>
    </body>
    </html>
    protected void btnPopup_Click(object sender, AjaxEventArgs e)
    {
        string scriptContent = "var sPopupWindowUrl = 'http://localhost/page1.aspx';\r\n"
            + "var sFeatures='resizable: no; status: yes; scroll: yes; help: no; center: yes; dialogWidth : 670px; dialogHeight : 660px;';\r\n "
            + "var passingArgs = null;\r\n\r\n"
            + "var rv=window.showModalDialog(sPopupWindowUrl, passingArgs, sFeatures);";
        Coolite.Ext.Web.ScriptManager.GetInstance(Page).AddScript(scriptContent);
    }
  2. #2

    RE: [CLOSED] Problem with HtmlEditor and showModalDialog

    Hi,

    It seems it is very old IE bug
    http://support.microsoft.com/kb/291125

    Try to add the following listener for HtmlEditor
    <Initialize Handler="this.getEditorBody().contentEditable = 'True';" Delay="20" />
    Why do you use IE modal dialog?
    You can use Coolite modal Window (in this case that bug doesn't occur)
    Vladimir Shcheglov
    Sr. Developer
  3. #3

    RE: [CLOSED] Problem with HtmlEditor and showModalDialog

    It works fine. Thanks!

Similar Threads

  1. window seem as showModalDialog
    By hihill in forum 1.x Help
    Replies: 4
    Last Post: Jul 02, 2012, 2:50 PM
  2. how to use the window.showModalDialog
    By krishna in forum 1.x Help
    Replies: 2
    Last Post: Mar 15, 2011, 3:14 PM
  3. Tabs are sliding up after ShowModalDialog
    By lazycoder in forum 1.x Help
    Replies: 3
    Last Post: Aug 03, 2009, 6:51 AM
  4. Problem in Htmleditor
    By speedstepmem4 in forum 1.x Help
    Replies: 1
    Last Post: Jun 03, 2009, 11:19 AM
  5. [CLOSED] HtmlEditor Problem
    By speedstepmem2 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 23, 2009, 5:40 PM

Posting Permissions