PDA

View Full Version : [FIXED] [V0.6] Load UserControl with Tab + HtmlEditor dinamically



ljcorreia
Aug 15, 2008, 10:51 AM
Hi Coolite team,

I'm wondering if someone can help me on a problem I'm facing using Coolite HtmlEditor.
It's been placed inside an User Control and the usercontrol has an TabPanel with Tabs which are been dinamically loaded. For simplicity sake, I'm just loading one tab here.

The error is: Invalid argument. coolite.axd (...this.iframe.style.width=D+"px"...)

D = -2 at this moment.

I putted the Editor inside an AnchorLayout following the recommendations I read in this forum, because AutoWidth property, for instance, doesn't seems to control correctly the width size of the internal Editor iframe.

I am sending a simple sample to reproduce the problem. I left the update panels just to be consistent with my project.

CooliteEditorTest4.aspx:


<%@ Page Language="C#" EnableEventValidation="false" %>


<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>


<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadTabs();
ChangeView(false);
}
}


private void LoadTabs()
{
System.Web.UI.Control myUserControl = LoadControl("~/HtmlEditorUC.ascx");

if (myUserControl != null)
{
myUserControl.ID = "HtmlEditorUC1";


Tab myTabControl = new Tab();
myTabControl.Title = "Tab3";
myTabControl.ContentContainer.ID = "TabControlContentContainer1";
myTabControl.AutoHeight = true;
myTabControl.ContentContainer.Controls.Add(myUserC ontrol);
TabPanel1.Tabs.Add(myTabControl);
}
}


private void ChangeView(Boolean type)
{
if (type)
{
Panel_List.Hide();
Panel_Detail.Show();
}
else
{
Panel_List.Show();
Panel_Detail.Hide();
}
}


protected void BtnBack_Click(object sender, EventArgs e)
{
ChangeView(true);
}


</script>


<!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 id="Head1" runat="server">
<title>Coolite Editor Test 4</title>
</head>
<body>
<p>
<a href="CooliteEditorTest4.aspx">Reload</a></p>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server" />
<asp:ScriptManager ID="ScriptManager3" runat="server" />
<asp:Label ID="lblMessage" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<ext:Panel ID="Panel_List" runat="server">
<Content>
<h2>
List</h2>
<asp:Button ID="BtnGoNext" runat="server" Text="GoNext" CausesValidation="false"
OnClientClick="Panel_List.hide();Panel_Detail.show();" />
</Content>
</ext:Panel>
<ext:Panel ID="Panel_Detail" runat="server">
<Content>
<h2>
Information</h2>
<asp:Label ID="Label2" runat="server"></asp:Label>
<asp:Label ID="lblDescription" runat="server"></asp:Label>
<ext:TabPanel ID="TabPanel2" runat="server" ActiveTab="0" Title="TabPanel2">
<Tabs>
<ext:Tab ID="TabDetails" runat="server" Title="Details" IconCls="tabs" AutoHeight="true" AutoScroll="True">
<Content>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<div runat="server" id="Div1" visible="true">
<h2>
List 2</h2>


<br />
<ext:TabPanel ID="TabPanel1" runat="server" ActiveTab="0" Height="300">
<Tabs>
<ext:Tab ID="Tab1" runat="server" Title="Tab 1">
<Content>
</Content>
</ext:Tab>
<ext:Tab ID="Tab2" runat="server" Title="Tab 2">
<Content>
</Content>
</ext:Tab>
</Tabs>
</ext:TabPanel>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</Content>
</ext:Tab>
</Tabs>
</ext:TabPanel>
<div style="text-align: center;">
<asp:Button ID="BtnBack" runat="server" Text="Back" CausesValidation="false" &#111;nclick="BtnBack_Click" />


</Content>
</ext:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>



HtmlEditorUC.ascx:


<%@ Control Language="C#" AutoEventWireup="true" %>


<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>


<script runat="server">

protected void Page_Load(object sender, EventArgs e)
{

}

</script>


<ext:Panel ID="Panel_Text" runat="server" Title="Panel Text" AutoHeight="false" Border="false"
BodyBorder="false" Frame="true" Collapsible="true">
<Content>
<ext:Panel ID="Panel1" runat="server" Height="300" Title="Short Text" Border="false"
BodyBorder="false" Frame="true">
<Content>
<ext:FitLayout ID="FitLayout1" runat="server">
<ext:HtmlEditor ID="HtmlEditor1" runat="server">
</ext:HtmlEditor>
</ext:FitLayout>
</Content>
</ext:Panel>
<ext:Panel ID="Panel2" runat="server" Height="200" Title="Long Text" Border="false"
BodyBorder="false" Frame="true">
<Content>
<ext:FitLayout ID="FitLayout2" runat="server">
<ext:HtmlEditor ID="HtmlEditor2" runat="server">
</ext:HtmlEditor>
</ext:FitLayout>
</Content>
</ext:Panel>
</Content>
</ext:Panel>



Any workarround would be very appreciated.

Leo.

ljcorreia
Aug 19, 2008, 3:00 PM
Dear Coolite team,

At the moment the main issue I am facing is related to HtmlEditor.
The problems I reported here in this thread happens not only when the Editor is dinamically loaded (code-behind as I thought). Sometimes the error is a bit different:



---------------------------
Error
---------------------------
A Runtime Error has occurred.
Do you wish to Debug?


Line: 64
Error: Object expected
---------------------------
Yes No
---------------------------


I'm using ext:TextArea for the moment just while I can't fix this problem, but seems that ext:TextArea also has some problems with sizing even putting it inside FitLayout or AnchorLayout. I've seen the examples here in this forum, and some hacks, but I could not find a complete solution for HtmlEditor.

Please, Can someone help with this?

Thanks.
Leonardo.

geoffrey.mcgill
Aug 20, 2008, 6:26 AM
Hi Leonardo,

I'm working through your examples now.

Is the HtmlEditor visible/shown on Page_Load? With the v0.5.x release, the HtmlEditor can not be hidden on initial page_load. For example, the HtmlEditor can not be in a Tab which is not active on page_load.

This HtmlEditor issue has been fixed with v0.6.

ljcorreia
Aug 20, 2008, 7:31 AM
Thanks for your reply Geoffrey

No, there is no hide/show property set to the HtmlEditor. But there is for the panel which the editor is within. As you can see on my sample page: Panel_List.Hide() / .Show().

If we focus just on this example for the moment and find out why it is throwing "Invalid argument" exception, maybe it can explain any other problem with the Editor.

I keep trying to fix and change it. As I told you I've done more tests and don't seems to be just because it is inside a tab dinamically inserted as I thought. But I tried my best to give you a sample to narrow down the problem and help on the solution.

As I also can see, the problem doesn't seems to be the nested updatepanel. I've also done some tests with updatepanels changing the UpdateMode/ChildrenAsChild properties or even removing the nested updatepanel and the error persists.

Thanks for your support. I really look forward to get this problem solved.
Let me know if you need anything from my side.

Leo.

ljcorreia
Aug 26, 2008, 4:20 PM
Hi Geoffrey,

Any news about this HtmlEditor problem?
Today I tried to update de version to the one I got on SVN v0.6.0.
Unfortunately I ran into even more problems. Must be all silly thing I am doing, but I am wondering if you got any Breaking Changes documentation for migrating version v0.5.4 to v0.6.0?

First I got some build errors related to 2 missing assemblies Coolite.Utilities and Newtonsoft.Json that I could managed to solve even before find this post http://forums.ext.net/showthread.php?postid=1230.aspx.

One question here: Do I need to reference Coolite.Utilities and Newtonsoft.Json DLL's in my project or just copy them to my bin folder?

Then I put the new dll in my project and the screens stop working. The weird was that I got no errors at all. No Javascript errors, anything. To make the long story short, I remembered I saw one post about changes UpdatePanel depending on UpdateMode property.

I was using:


UpdateMode="Conditional" ChildrenAsTriggers="false"

Then I changed to:


UpdateMode="Always" ChildrenAsTriggers="true"

That solves the one problem for the moment, but I still want to discuss about this in the future...

The other problem was with Listeners. I was inserting Listeners at CodeBehind and seems that the sintaxe changed a little bit:

From:

tb2.Listeners.Resize = new Coolite.Ext.Web.Listener("myHandler...");

To:

Coolite.Ext.Web.Listener listener = new Coolite.Ext.Web.Listener();
Coolite.Ext.Web.Listener listener = new Coolite.Ext.Web.Listener();
listener.Handler = "myHandler javascript";
tb2.Listeners.Resize = listener;


Is that the new and correct way of doing this on code-behind?

The other thing was some issues with layout. I think is with AutoHeight, AutoWidth properties. I could not finish testing it.

At least, but not last, the HtmlEditor still not work on v0.6.0. It thows the same problem. Please, can someone give me an estimative if it will be possible to do a workaround or something to fix the problem?
I am desperate to make this Editor work. I need you help, please!

Thanks

Leonardo.

geoffrey.mcgill
Aug 26, 2008, 4:50 PM
I apologize for the build errors. The project is still in a weird unstable state at the moment. We're working on some core API revision and it's affecting all controls. I'm hoping SVN should be stabilized within the next 4 hours.

I started on a major revision to the <asp:UpdatePanel> support and got about 50% through. The other 50% should be complete within the next day or two. Any use of the <asp:UpdatePanel> with the current build (Revison #257) will give mixed results.

I'm not sure why the references to Coolite.Utilities and Json.net keep dropping. I'll fix the problem before the end of the day.

Both of your Listener syntax examples should work.

I did reproduce your original HtmlEditor sample, but fixing related issues took me down a different path. If I remember correctly, one thing I noticed was the HtmlEditor is buried inside a Tab which is not visible on initial Page_Load. There was some work done in ExtJS 2.2 to improve support for hidden HtmlEditor's on load, although I suspect problems still exist. I need to do more testing regarding this feature.

Give me either 4 hours (or 28 hours) to respond again.

ljcorreia
Aug 27, 2008, 7:26 AM
Hi Geoffrey,

Thanks for your reply and all your effort to fix all issues.
Don't worry, I understand your position, and I can see you guys are doing an excellent job. Unfortunately my project is already on live, and the Editor is very important at this stage.
As I said, my main concern at the moment is about this HtmlEditor. It was working before, but I had to reajust the layout and other things and it stopped to work.
I remember you asking me last time about this visible property. I've seen many threads about it, even in ExtJs forum. No. I am not using Tab visible. In fact, I am using a Main Coolite Panel and setting it to Hide/Show, as it were a standard asp View/Multiview controls. That means, instead of using <asp:View...> I just set Panel Hide/Show on codebehind.
The editor is in my second Panel which is Hidden by default on Page_Load. That means it will be displayed just when the user select an option on the first screen panel.
The way I sent you the example you can see exactly what is my scenario (http://forums.ext.net/showthread.php?postid=1182.aspx).


But I tried NOT to set any visibility property, indeed. I definitelly don't think this issue is related to Visibility. But I do believe it is related to something in LAYOUT and Editor internal iframe. I am guessing here.

As I sent you already, the error I am getting:



---------------------------
Error
---------------------------
A Runtime Error has occurred.
Do you wish to Debug?


Line: 136
Error: Invalid argument.
---------------------------
Yes No
---------------------------



Sorry I still don't know: Do I need to reference Coolite.Utilities and Newtonsoft.Json DLL's in my project or just copy them to my bin folder or it is an issue and I shouldn't been asked about this dlls?

Once again, thank you very much for your support.
I am waiting for your reply and willing to test anything. Please, let me know if there is anything I can help.

ljcorreia
Aug 27, 2008, 8:21 AM
Hi Geoffrey,

After send you the latest post I remember that I was using another option that could be related with visibility. The Editor is inside a Panel with Collapsed=true.

Then I set it to false and started to get different error messages. I will write the messages here. Maybe it can help in some way:

Internet Explorer (IE7):


---------------------------
Windows Internet Explorer
---------------------------
Internet Explorer cannot open the Internet site http://localhost/My-Project/start.aspx.


Operation aborted
---------------------------
OK
---------------------------

It happens when I click on the left hand side menu that is located on West region. So, on IE, it not even open my page on Central region (iframe) if I set the property to Collapsed=true.
Then it is followed by the message:



---------------------------
Error
---------------------------
A Runtime Error has occurred.
Do you wish to Debug?


Line: 76
Error: 'null' is null or not an object
---------------------------
Yes No
---------------------------


Debugging:


...this.el=H.createChild({id:this.id,cls:this.base Cls},G)...


On Firefox, it opens the page on my Center region (iframe), but the error I got on Firebug is:



[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)
[nsIDOMNSHTML&#100;ocument.designMode]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"
location: "JS frame :: http://localhost/My-Project/extjs/ext-all-js/coolite.axd :: anonymous :: line 136" data: no]


http://localhost/My-Project/extjs/ext-all-js/coolite.axd
Line 136

There are 2 Editors on this screen. I noticed that just one renders on FF and it cames with false inside the Editor's iframe body as you can see on the image attached: FF-HTMLEditor.jpg

The second editor hasn't been rendered on IE as well when Collapsed was true. I turn back the Collapsed property to true just to get the screen after the Invalid Argument message on IE. My surprise was that it no longer worked as before. It keeps showing me the messages I reported here for IE. Even cleaning browse caching, restartin IIS, etc.

I don't know... it is so weid for me... maybe it will make sense for you guys.

The only thing I know is that since I started using Coolite I reported here some issues with IIS7 and Vista. Sometimes I still get this weird problems that I need to change the CleanResourceUrl property on Coolite ScriptManager.
And on FF, seems that someone already had this problem with the Editor and Ext 2.2. Please, have a look at this:


Mistake to change Ext ver. 2.2: http://extjs.com/forum/showthread.php?p=209109

Thanks.

Leo.

ljcorreia
Sep 01, 2008, 8:08 AM
Hi Coolite team,

Sorry to say that I didn't managed to solve the issues I pointed in my last thread. Today I got the latest release again (278) and tested with no luck.
What make things even worst is that problem on IE (Operation Aborted) I mentioned before. It is when the first panel is rendered to screen.

I've seen some people experiencing the same issue, and all point to the Ext altering the a DOM element before it has been loaded. Here a couple of links:

http://extjs.com/forum/showthread.php?t=4778
http://extjs.com/forum/showthread.php?t=15575

I put the script manager in Debug mode, but the far I could see is that it happens onRender of my Panel:


Microsoft JScript runtime error: 'null' is null or not an object



this.el = ct.createChild({
id: this.id,
cls: this.baseCls
}, position);

I am really in trouble with this, trying to release a version to my customer at least with a TextArea instead of the Editor, but I got stuck in this problem.

Sorry, it is very urgent to us. Any help would be very appreciated.

Thanks.
Leo.

geoffrey.mcgill
Sep 01, 2008, 9:39 AM
Hi Leo,


"The Editor is inside a Panel with Collapsed=true."

As mentioned earlier, the <ext:HtmlEditor> *may* not work as expected if it is not visible on initial page_load. By "visible", I mean, I must be able to see and click on the HtmlEditor on initial page_load.

I tried your sample again but you're using a pretty complicated mix of <asp:UpdatePanel>'s and .ascx user controls. It's a bit difficult to determine exactly how things should be working. Can you make a simplier example which demonstrates maybe just one of the problems first?

I'll play around some more with your code to try and determine how it should work, although the issue with the hidden <ext:HtmlEditor> is still probably going to be present.

ljcorreia
Sep 01, 2008, 11:01 AM
Hi Geoffrey,

Thanks for your reply.

As I mentioned, I did try to put the Panel Collapsed to false, but as far as I can see there will be always an Visibility issue. Because the Panel itself is also inside a Tab which is not active at the first time.

I tried all suggestions to make it HideMode="Offset", but that doesn't work as well.

I rollback my version to 0.5.4 where most problems doesn't happens. I managed to make even the Editor works on version 5.4, but just on IE. On FF, the Editor appears like the image attachment I sent you before with the following message catch by Firebug:


[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)
[nsIDOMNSHTML&#100;ocument.designMode]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"
location: "JS frame :: http://localhost/My-Project/WebResource.axd?d=27x8NyvfFe-WhbSIolxoYHizwdCDnUbZgkzlmy9HgsnZbla3K65wO-P_Bc4nasX7iMGQmLqwUHhYmTeRXyfv9ey8b_IIdm6rSMtCXD7O 3-o1&amp;t=633558655869900051
:: anonymous :: line 28447" data: no]


http://localhost/My-Project/WebResource.axd?d=27x8NyvfFe-WhbSIolxoYHizwdCDnUbZgkzlmy9HgsnZbla3K65wO-P_Bc4nasX7iMGQmLqwUHhYmTeRXyfv9ey8b_IIdm6rSMtCXD7O 3-o1&amp;t=633558655869900051


Line 28447

Sys$CultureInfo$_getAbbrMonthIndex("")

No, sorry, unfortunately I could not make a simplier sample, because on simple scenario that problems just doesn't happen. I wish I could remove UpdatePanels, because I don't like the way UpdatePanels do Ajax, but I have no simpliest solution to work with Ajax. Before I was using Anthem and your Coolite AjaxEvents are my hope to remove that UpdatePanels.

What I was trying to explain you in my last post is that not even my pages were not been loaded because that 'Operation Aborted' problem. This problem is very critical and doesn't not happen on version 0.5.4.
I'll try to make a simpler sample to reproduce this specific problem, but there are other issues preventing me to update to Coolite version 0.6.0.

When I asked you about the Listener sintax, you told be both ways should work, but that is not true. The way I am doing at the moment with the version 0.5.4 is not valid for version 0.6.0. That is way I asked by a breaking changes documentation. It says that there is no Listener constructor with one argument. But don't worry about it, as long as the other way works, it is fine. I am just giving you feedback.

Ok, I'll chat with you soon.
Leo.

geoffrey.mcgill
Sep 01, 2008, 12:43 PM
Hi Leo,

If using the latest source from SVN, the following sample demonstrates three different ways to add a Click Listener. I reviewed the code sample you provided earlier and it should work. Give the following sample a try and let me know if you experience something different.

Example


<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
// Option #1 - Create new Listener()
this.Button1.Listeners.Click = new Listener("!{'Message', 'Button1_Click_1'}");

// Option #2 - Set the .Handler property.
// The Listener object is created automatically when the .Handler property is set.
this.Button1.Listeners.Click.Handler = "!{'Message', 'Button1_Click_2'}";
}
</script>

<ext:Button ID="Button1" runat="server" Text="Submit" AutoPostBack="false">
<Listeners>
<%--// Add the Listener via markup--%>
<Click Handler="!{'Message', 'Button1_Click_3'}" />
</Listeners>
</ext:Button>

NOTE: I demonstrate three options above, but obviously all three do exactly the same thing and the ones not being tested should be commented out.

Hope this helps.

geoffrey.mcgill
Sep 01, 2008, 12:49 PM
I've also been running many samples with the <ext:HtmlEditor> and it looks like several bugs were introduced with the ExtJS v2.2 release. I know there was some work done on the HtmlEditor to fix the FireFox/Safari rendering bugs, although those revisions may have created new problems.

I'm working with the extjs team to document the defects and find possible work-arounds.

For now (Coolite v0.6 + ExtJS 2.2) the old rule that the HtmlEditor must be visible on initial page load still applies. Currently this is just a limitation of the HtmlEditor.

ljcorreia
Sep 03, 2008, 12:45 PM
Hi Geoffrey,

Thanks for the listeners examples.
Quick question still regarding Listeners:

Considering Option #2 or #3, adding listeners through code-behind, how can I destroy/clear the old listeners before insert new ones.

I've seen this post, using clearListeners() on client side. I am wondering how they can be cleared on code-behind c#.

Thanks.

PS: Using version 0.5.4.

geoffrey.mcgill
Sep 04, 2008, 1:31 PM
Hi Leo,

I apologize for the delay in getting back to you.

Currently (0.5.x) setting the Listener to "null" will clear/reset the Listener.

Example


this.Button1.Listeners.Click = null;

We're also working on a .Clear() Method that will be available on both the .Listeners property and on the individual Listener objects.

The following code sample demonstrates how to clear all Listeners for the <ext:Button> control.

Example


this.Button1.Listeners.Clear();

The following code sample demonstrates how to clear an individual Listener.

Example


this.Button1.Listeners.Click.Clear();

The sample .Clear() Method has also been added to the AjaxEvents.

The following code sample demonstrates clearing all AjaxEvents from an <ext:Button> control.

Example


this.Button1.AjaxEvents.Clear();

The following code sample demonstates how to clear an individual AjaxEvent.

Example


this.Button1.AjaxEvents.Click.Clear();

The .Clear() functionality is being tested right now, and will be available with the v0.6 release.

Hope this helps.

geoffrey.mcgill
Sep 05, 2008, 10:33 AM
Hi Leo,

I just committed a revision to ext-all.js which might help with the hidden (non visible) <ext:HtmlEditor> rendering issues. I have not re-run your sample, but the revision did fix a couple other problems I found with the <ext:HtmlEditor>.

I'm working right now on the <asp:UpdatePanel> support within the toolkit, which should also help with your samples.

You *must* clear your browsers cache if you svn update and build with the latest code (Revision #303).

ljcorreia
Sep 05, 2008, 2:57 PM
Hi Geoffrey,

Thank you very much. That solved all my problems, including those 'Operation Aborted' not related to Editor and UpdatePanel.

Well done. Really aprreciate all your effort to solve the problems.

I am back to version 0.6.0.

Best regards,
Leo.

geoffrey.mcgill
Sep 05, 2008, 3:00 PM
well, I wasn't expecting that, but I'll take it. :)

Let me know if you find any other issues. 

ljcorreia
Sep 23, 2008, 9:56 AM
Hi Geoffrey,

Sorry to say we still have one of the issues with Editor.
So much I wish had solve this annoying problem, that maybe I haven't tested it correctly.
Anyway, now I am in trouble again, an urgent help would be very appreciated.

It is a shame because all the rest of the Coolite/ExtJs Framework works like a charm, but the editor simply has so many problems.

I managed to solve that 'Invalid Argument' problem by setting an width for the editor, although I got the AutoWidth property set to true. I played around with the properties, and the code I have so far is:


<ext:Panel ID="Panel1" runat="server" Height="200" Title="Short Text" Border="false" BodyBorder="false" Frame="true">
<Content>
<ext:AnchorLayout ID="AnchorLayout1" runat="server">
<ext:Anchor Horizontal="100%" Vertical="100%">
<ext:HtmlEditor ID="HtmlEditor_ShortText" Height="285" Width="680" AutoWidth="true" runat="server" StyleSpec="width:98%;">
</ext:HtmlEditor>
</ext:Anchor>
</ext:AnchorLayout>
</Content>
</ext:Panel>

The main issue is that the internal editor frame is not setting its size correctly as you can see on the screenshots I am sending you.
The text goes just to the half of the way and you can notice there if I paste a long text the scroolbar shows up at that position and the toolbar is no longer visible.

Thanks for your help

Leo.

ljcorreia
Sep 23, 2008, 10:22 AM
Hi Geoffrey,

I managed to solve the problem by getting the new release, referencing all again and removing AutoWidth and StyleSpec property. So, please, ignore my last thread, bu I do still need your help for the problem on FF that I mentioned here (http://forums.ext.net/showthread.php?postid=1345.aspx). Actually the code error is the same, but the message is slightly different:


uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTML&#100;ocument.designMode]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://localhost/My-Project/WebResource.axd?d=27x8NyvfFe-WhbSIolxoYHizwdCDnUbZgkzlmy9HgsnZbla3K65wO-P_Bc4nasX7iMGQmLqwUHhYmTeRXyfv9ey8b_IIdm6rSMtCXD7O 3-o1&amp;t=633577670887436990 :: anonymous :: line 29525" data: no]


Line 0

Again, it just happens on Firefox.

Best regards.

Leo.

geoffrey.mcgill
Sep 23, 2008, 10:51 AM
Hi Leo,

Thanks for the update. 


If you disable FireBug, does a JavaScript error message get thrown? I think that message is just an uncaught exception and FireBug is trapping. It probably has something to do with the HtmlEditor <iframe>. Typically a js error will not get thrown to the user and I thinks that's why you don't get the error message in IE or any browser other than FF with FB running. 


Hope this helps.

ljcorreia
Sep 23, 2008, 12:34 PM
Hi Geoffrey,

Yes, if I completely disable the Firebug the javascript error message still get thrown. I can still see the message on Firebug Error Console.
On the previous release I reported it was even worst because I could not even use the editor on FF. As I said on the previous thread, the message now is slightly different althought the error code is the same.

Please, have a look at this: http://extjs.com/forum/showthread.php?p=210590

I agree with you, it is something to do with the Editor <iframe> indeed.

Leo.

geoffrey.mcgill
Sep 23, 2008, 12:54 PM
I the ext post (http://extjs.com/forum/showthread.php?p=217104#post217104) you linked to there was a workaround proposed. Does the workaround help solve the problem?


<ext:HtmlEditor
ID="HtmlEditor1"
runat="server">
<CustomConfig>
<ext:ConfigItem Name="autoMonitorDesignMode" Value="false" Mode="Raw" />
</CustomConfig>
<Listeners>
<Show Handler="el.checkDesignMode();" />
</Listeners>
</ext:HtmlEditor>

ljcorreia
Sep 23, 2008, 2:05 PM
Hi Geoffrey,

Thanks for your reply. No, unfortunately it does not work for me with this workaround. I also tested setting the HideMode to Offset which some people suggested as a workaround. None solved the problem.

I didn't know that it was possible to add config items as the way you've done. It gives us more power to test any other suggestion. I always get impressed the clear way you guys do things. Well done!

Another update: I told you the message appears but the editor was working, but sorry to inform that it is not true. The Editor does not work in FF.

Let me know if you have any other idea to solve this issue.

Thanks
Leo.

ljcorreia
Nov 06, 2008, 8:19 AM
Hi Geoffrey,

Do you have any update for the "uncaught exception: 0x80040111" problem that happens on FF?


uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTML&#100;ocument.designMode]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://.../WebResource.axd?d=2l8PQ_g2z2uRHfQOq_oW4_7DzWDsnLt0 vtvPJ_mPZkMB2gqi3TOP4L10lFEjSO1milFNMojIfYVB9vgyHZ w3ZYFA76hOzxgRWYxB_0kTmCE1&amp;t=633614840133750000 :: anonymous :: line 29525" data: no]


Line 0

I need go for a solution on this, but I ran out of ideas.

Your help would be very appreciated.
Thanks.

Leo.