Oct 23, 2009, 5:06 AM
[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);
}