Rank: Advanced Member Groups: Member
Joined: 5/15/2013 Posts: 34
|
I have a dialog which contains a AJAXUploader. When the dialog is canceled, either through the dialog cancel button or though my JavaScript cancel button, I get the following JavaScript error: Unhandled exception at line 6, column 3850 in http://localhost/eo_script/eo.5c6ab251-6c76-43c2-a37b-3cdae68a761e.js 0x800a138f - JavaScript runtime error: Unable to get property 'parentNode' of undefined or null reference I have the same logic in my production server and it cancels fine (ASP.NET 4.0, EO.Web 11.0.20.2). I have a new release of my web site in development and have updated the EO.Web.dll to the latest release for testing (EO.Web 11.0.30.2) and get this error. I have update earlier to a EO.Web release which also had the problem, that why I'm on the latest. All my other Dialogs work just fine, it seems to happen on any of my dialog pages which contain the AJAXUploader control. Attached is a test page were I get the problem: Parent Page:
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestParentPage.aspx.cs" Inherits="FlightPlanner.Web.TestParentPage" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Parrent Page</title>
<script type="text/javascript">
function gDialogCloseFunction(result)
{
console.info("gDialogCloseFunction: arg=" + result);
var dlgFrame = window.document.getElementById("Dialog1Frame");
if (dlgFrame.document)
{ dlgFrame.document.body.innerHTML = ""; //Chrome, IE
}
else
{ dlgFrame.contentDocument.body.innerHTML = ""; //FireFox
}
var dlg = eo_GetObject('Dialog1');
dlg.close(result);
}
var gDialogClientSideCancel = function (dialog, arg)
{
gDialogCloseFunction(null); // just close
};
function OpenTestDialog()
{ console.info("OpenTestDialog:");
var dlgFrame = window.document.getElementById("Dialog1Frame");
dlgFrame.width = 500;
dlgFrame.height = 200;
dlgFrame.src = "/TestDialogPage.aspx";
var dlg = eo_GetObject('Dialog1');
dlg.show(true, "Test Dialog");
}
</script>
<link href="App_Themes/SoftracClassic/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div class="master-wrapper-content" style="text-align: center">
<br />
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Show Dialog" OnClientClick="OpenTestDialog(); return false;" />
<br />
<br />
<br />
</div>
<eo:Dialog ID="Dialog1" runat="server" CloseButtonUrl="00020440" ControlSkinID="None" HeaderHtml='Dialog1' HeaderHtmlFormat="<div style="padding-top:4px">{0}</div>" HeaderImageHeight="27" HeaderImageUrl="00020441" ClientSideOnCancel="gDialogClientSideCancel">
<HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'Arial';font-size:10pt;font-weight:bold;padding-bottom:7px;padding-left:8px;padding-right:0px;padding-top:0px;" />
<ContentStyleActive CssText="background-color:#f0f0f0;font-family:Arial;font-size:8pt;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px" />
<ContentTemplate>
<iframe id="Dialog1Frame"></iframe>
</ContentTemplate>
<FooterStyleActive CssText="background-color:#f0f0f0; padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: Arial" />
<BorderImages BottomBorder="00020409,00020429" BottomLeftCorner="00020408,00020428" BottomRightCorner="00020410,00020430" LeftBorder="00020406,00020426" RightBorder="00020407,00020427" TopBorder="00020402,00020422" TopLeftCorner="00020401,00020421" TopLeftCornerBottom="00020404,00020424" TopRightCorner="00020403,00020423" TopRightCornerBottom="00020405,00020425" />
</eo:Dialog>
</form>
</body>
</html>
Code: C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FlightPlanner.Web
{
public partial class TestParentPage : System.Web.UI.Page
{
protected void Page_Load (object sender, EventArgs e)
{
}
}
}
Child (dialog) page:
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestDialogPage.aspx.cs" Inherits="FlightPlanner.Web.TestDialogPage" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test Dialog</title>
<link href="App_Themes/SoftracClassic/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<script type="text/javascript">
function DoDialogClientClose() { this.parent.gDialogCloseFunction (null); }
function AjaxOnError(control, error, message) { eo_MsgBox("MsgBox1", "Test Page", message, null, [{ Text: 'OK' }]); }
</script>
<div class="dialog-content" style="width: 365px; height: 130px;">
<eo:AJAXUploader ID="AJAXUploader1" runat="server" AutoPostBack="True" AutoUpload="True" OnFileUploaded="AJAXUploader1_FileUploaded" ClientSideOnError="AjaxOnError" MaxDataSize="3145727" MaxFileCount="1">
<LayoutTemplate>
<table>
<tr>
<td>
<asp:PlaceHolder runat="server" ID="InputPlaceHolder">Input Box Place Holder</asp:PlaceHolder>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<eo:ProgressBar runat="server" ID="ProgressBar" ControlSkinID="None" BackgroundImage="00060301" BackgroundImageLeft="00060302" BackgroundImageRight="00060303" IndicatorImage="00060304" ShowPercentage="True" Width="250px" />
</td>
</tr>
<tr>
<td>
<asp:PlaceHolder ID="ProgressTextPlaceHolder" runat="server">Progress Text Place Holder </asp:PlaceHolder>
</td>
</tr>
</table>
</LayoutTemplate>
</eo:AJAXUploader>
</div>
<div class="dialog-button-div">
<asp:Button ID="btnCancel" runat="server" CssClass="dialog-button" Text="Cancel" OnClientClick="DoDialogClientClose(null); return false;" CausesValidation="False" />
</div>
<eo:MsgBox runat="server" ID="MsgBox1" HeaderHtml="FlightPlanner" HeaderImageUrl="00020441" HeaderHtmlFormat='"padding-top:4px">{0}</div>' ControlSkinID="None" HeaderImageHeight="27" CloseButtonUrl="00020440" Width="250px">
<FooterStyleActive CssText="background-color:#f0f0f0; padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma"></FooterStyleActive>
<HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:7px;padding-left:8px;padding-right:0px;padding-top:0px;"></HeaderStyleActive>
<ContentStyleActive CssText="background-color:#f0f0f0;font-family:tahoma;font-size:8pt;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px"></ContentStyleActive>
<BorderImages BottomBorder="00020409,00020429" RightBorder="00020407,00020427" TopRightCornerBottom="00020405,00020425"
TopRightCorner="00020403,00020423" LeftBorder="00020406,00020426" TopLeftCorner="00020401,00020421"
BottomRightCorner="00020410,00020430" TopLeftCornerBottom="00020404,00020424" BottomLeftCorner="00020408,00020428"
TopBorder="00020402,00020422"></BorderImages>
</eo:MsgBox>
</form>
</body>
</html>
Code: C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EO.Web;
namespace FlightPlanner.Web
{
public partial class TestDialogPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AJAXUploader1.TempFileLocation = HttpContext.Current.Request.PhysicalApplicationPath + "eo_import";
}
private void BadImport(string errMsg)
{
MsgBox1.Show ("FlightPlanner", errMsg, null, new EO.Web.MsgBoxButton("OK"));
}
protected void AJAXUploader1_FileUploaded (object sender, EventArgs e)
{
if (AJAXUploader1.PostedFiles.Count() == 0)
{ BadImport("Please upload an import file!");
return;
}
AJAXPostedFile file = AJAXUploader1.PostedFiles[0]; // 1 file at a time
AJAXUploader1.ClearPostedFiles();
/// NON FUNCTIONAL - dialog will close////
}
}
}
|
Rank: Advanced Member Groups: Member
Joined: 5/15/2013 Posts: 34
|
Another tidbit of Information: I'm using Internet Explorer 10 when it fails.
Other browsers don't complain: FireFox, Chrome, Opera
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
You may want to try it on another machine and see if it works for you. We are not able to reproduce the problem on any browser. Also if you have the page online, we will be happy to take a look as well. You can PM us the Url address if you do not wish to post it publicly in the forum.
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 5/15/2013 Posts: 34
|
Thanks for the reply.
My new release should be posted in about a week (or two).
If I still have the problem, I am more then willing to PM you with the details.
|