|
Rank: Member Groups: Member
Joined: 8/27/2009 Posts: 10
|
Hi,
I have a web page containing an EO treeview control and an IFRAME. I am receiving an intermitent error under IE8 (havent tested other browsers yet) when the code below is executed due to a mouseover event.
The code fails at "this.ak.at(" because this.ak is null
function _eofldr_bq(a){this.ar(false);if(!this.as||!this.am){this.as=truethis.ak.at(true,a,this.an.....etc
Help please. Brian
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Can you provide a test page that reproduces the error? Make sure the page runs independently because most likely we will need to run/debug it here in order to find out what’s going on.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 8/27/2009 Posts: 10
|
Ok... Have managed to replicate .... The main page contains an IFRAME and a TreeView menu. The contents of the IFRAME are changed when a menu node is selected.... One of my pages (TestPage1.aspx) reloads the menu in the parent page when it is loaded into the IFRAME... this allows me to dynamically alter the contents of the menu.... The menu is rebuilt inside a CallBackPanel to allow the rest of the page to remain the same... To produce the fault, just select the menu items alternately until the fault is thrown.... Here is the master page
Code: HTML/ASPX
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Debug.Master.cs" Inherits="ecWebsite.Member.Debug.Debug" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!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>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body style="background-color:White">
<form id="aspform" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<asp:ContentPlaceHolder ID="body" runat="server">
</asp:ContentPlaceHolder>
</div>
<eo:MsgBox ID="popup" runat="server" AllowResize="True" BorderColor="#335C88"
BorderStyle="Solid" BorderWidth="1px" CloseButtonUrl="00070101"
ControlSkinID="None" HeaderHtml="Dialog Title"
Height="200px" Width="300px"
ShadowColor="LightGray" ShadowDepth="3" BackColor="InfoBackground">
<HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 11px; padding-bottom: 3px; padding-top: 3px; background-color:#507CD1;color:White;font-weight:bold;" />
<FooterStyleActive CssText="padding-bottom: 8px;" />
<ContentStyleActive CssText="padding-top: 4px;padding-left: 4px;padding-right: 4px;font-weight:bold;" />
</eo:MsgBox>
</form>
</body>
</html>
Here is the main page
Code: HTML/ASPX
<%@ Page Title="" Language="C#" MasterPageFile="~/Debug/Debug.Master" AutoEventWireup="true" CodeBehind="TestMenuFault.aspx.cs" Inherits="ecWebsite.Debug.TestMenuFault" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script language="javascript" type="text/javascript">
function actionItem(e,eventInfo) {
var itemId = eventInfo.getItem();
var url = itemId.getNavigateUrl();
if (url) showPage(url);
return false;
}
function showPage(url) {
document.getElementById("<%=iframe.ClientID%>").src = url;
}
function refreshMenu() {
eo_Callback('callbackMenu', 'refresh');
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
<table width="100%">
<tr>
<td style="width:400px">
<iframe id="iframe" runat ="server"
src="Search/WorkspaceSearch.aspx?st=r"
width="100%" height="500px"
frameborder="0" scrolling="auto">
Sorry, your browser does not support IFRAMES.
</iframe>
</td>
<td style="vertical-align:top">
<eo:CallbackPanel ID="callbackMenu" runat="server" Height="300px" Width="277px">
<eo:TreeView ID="tvMenu" runat="server" Height="300px" Width="277px"
ControlSkinID="None" ClientSideOnItemClick="actionItem">
<LookNodes>
<eo:TreeNode ItemID="_Default" CollapsedImageUrl="00030201"
DisabledStyle-CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;color:Gray;padding-bottom:1px;padding-left:1px;padding-right:1px;padding-top:1px;"
ExpandedImageUrl="00030202" ImageUrl="00030203"
NormalStyle-CssText="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; COLOR: black; BORDER-TOP-STYLE: none; PADDING-TOP: 1px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: transparent; BORDER-BOTTOM-STYLE: none"
SelectedStyle-CssText="background-color:#316ac5;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:White;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;">
</eo:TreeNode>
</LookNodes>
<TopGroup Style-CssText="border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:black;cursor:hand;font-family:Tahoma;font-size:8pt;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;">
</TopGroup>
</eo:TreeView>
</eo:CallbackPanel>
</td>
</tr>
</table>
</asp:Content>
Here is the code behind for the Main Page
Code: C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ecWebsite.Debug
{
public partial class TestMenuFault : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
callbackMenu.Execute += new EO.Web.CallbackEventHandler(callbackMenu_Execute);
if (!IsPostBack)
{
buildMenu();
iframe.Attributes.Add("src", "TestPage2.aspx");
}
}
void callbackMenu_Execute(object sender, EO.Web.CallbackEventArgs e)
{
if (e.Parameter.StartsWith("refresh"))
{
buildMenu();
}
}
void buildMenu()
{
tvMenu.Nodes.Clear();
EO.Web.TreeNode node = new EO.Web.TreeNode("Test 1");
node.NavigateUrl = "TestPage1.aspx";
tvMenu.Nodes.Add(node);
node = new EO.Web.TreeNode("Test 2");
node.NavigateUrl = "TestPage2.aspx";
tvMenu.Nodes.Add(node);
}
}
}
Here is the test page (TestPage1.aspx)
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPage1.aspx.cs" Inherits="ecWebsite.Debug.TestPage" MasterPageFile="~/Debug/Debug.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
.dragme{position:relative;}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
This is a normal ASPX page displayed in an iframe
<br />
<asp:Button ID="Button1" runat="server" Text="Cause Error" onclick="Button1_Click1" />
<asp:Button ID="Button2" runat="server" Text="Replace Page (no error)"
onclick="Button2_Click" />
</asp:Content>
and the Code behind....
Code: C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ecWebsite.Debug
{
public partial class TestPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Ensure the menu is updated
ClientScript.RegisterClientScriptBlock(this.GetType(), "refreshWorkspaceMenu", "parent.refreshMenu();", true);
}
protected void Button1_Click1(object sender, EventArgs e)
{
Response.Redirect("sample.pdf",true);
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("testpage2.aspx", true);
}
}
}
TestPage2 can be anything......
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPage2.aspx.cs" Inherits="ecWebsite.Debug.TestPage2" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<div>
This is a normal HTML page (No Master page)
</div>
</form>
</body>
</html>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We created a test project based on your code but were not able to reproduce the error. Can you send the whole test project to us in zip format? We will PM you as to where to send.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have posted a new build that should fix this problem. Please see your private message for download location.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 8/27/2009 Posts: 10
|
Great.... the problem appears to be fixed.
Thanks for the great support.
BP
|
|