There have been several posts related to this issue for earlier versions of IE but I am using IE8 and still getting this problem. I have an Editor on an aspx page. This page is opened in a new window when requested via javascript on the opening page. After the form has loaded several times successfully the next load will not finish (locks up) and not only is this new window locked up, but the browser that opened the new window is hung and must be closed. This is a very simple page. I have debug="false" in the web.config.
Here is my code behind:
Imports System.Web.HttpResponse
Imports
System.Web.HttpRequest
Imports
System.Web.HttpApplicationState
Imports
System.IO
Imports
System.Xml
Imports
System.Data
Imports
System.Data.OleDb
Imports
code
Imports
System.Diagnostics
Imports
System.Web
Partial
Class HTMLEditor
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim OpeningForm As String = "" & Request.QueryString("form")
Dim Script As String = ""
Script =
"function CloseWindow(){ " & vbCrLf
Script +=
"window.close(); " & vbCrLf
Script +=
"return true; " & vbCrLf
Script +=
"} " & vbCrLf
Script +=
"function UpdateOpener(){ " & vbCrLf
Script +=
"var strValue = $find(""" & "RadEditor1" & """).get_html();" & vbCrLf
Script +=
"window.opener.document." & OpeningForm.ToString.Trim & ".Data.value = strValue;" & vbCrLf
Script +=
"window.close(); " & vbCrLf
Script +=
"return true; " & vbCrLf
Script +=
"} " & vbCrLf
Script +=
"function GetOpenerContent(){ " & vbCrLf
Script +=
" var strValue = window.opener.document." & OpeningForm.ToString.Trim & ".Data.value; " & vbCrLf
Script +=
" $find(""" & "RadEditor1" & """).set_html(strValue); " & vbCrLf
Script +=
" return true; " & vbCrLf
Script +=
"} " & vbCrLf
If ClientScript.IsClientScriptBlockRegistered(Page.GetType(), "MyScriptTransfer") = False Then
ClientScript.RegisterClientScriptBlock(Page.GetType(),
"MyScriptTransfer", Script.ToString, True)
End If
Button4.Attributes.Add(
"onclick", "UpdateOpener();")
Button5.Attributes.Add(
"onclick", "CloseWindow();")
End Sub
Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
'RadEditor1.Content = ""
End Sub
Protected Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.Click
End Sub
Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click
End Sub
End
Class
Here is my html:
<%
@ Page Language="VB" AutoEventWireup="false" CodeFile="HTMLEditor.aspx.vb" Inherits="HTMLEditor" Debug="false" %>
<%
@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!
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>Preference HTML Editor</title>
</
head>
<
body runat="server" id="bodytag">
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" ScriptMode="Release">
</telerik:RadScriptManager>
<div>
<asp:Table ID="Table1" runat="server" Width="600">
<asp:TableRow Width="600">
<asp:TableCell Width="600" HorizontalAlign="Center" >
<telerik:RadEditor ID="RadEditor1" Runat="server" OnClientLoad="GetOpenerContent" width="600" >
<Content>
</Content>
</telerik:RadEditor>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow Width="600">
<asp:TableCell Width="600" HorizontalAlign="Center" >
<asp:Button ID="Button4" onclick="Button4_Click" runat="server" Text="Save" />
<asp:Button id="Button5" onclick="Button5_Click" runat="server" text="Cancel" ></asp:Button>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<asp:TextBox ID="TextBox1" runat="server" visible="false"></asp:TextBox>
</div>
</form>
</
body>
</
html>
