[CLOSED] IE8: HTML Parsing Error

Page 1 of 3 123 LastLast
  1. #1

    [CLOSED] IE8: HTML Parsing Error

    We are getting a JavaScript error in IE8 using the official Ext.Net 1.0 RC dlls. This error occurs with the Ext.Net 1.0 RC dll's and also the latest compile from SVN. We are not getting this error from a dll we compiled from SVN 4-5 months ago.

    The example is very simple and the Ext.Net control still renders but in our real project this error halts the rest of our javascript from executing properly.

    Attached is a project containing some test code that does nothing more than add a panel to an empty page with a resource manager and the error still occurs. Just need to re-reference the Ext.Net dll's to get it to work.


    Here is the direct error from IE8:

    Webpage error details
    
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; .NET CLR 3.0.04506.30; GBMNA_IE7)
    Timestamp: Fri, 18 Feb 2011 21:40:59 UTC
    
    
    Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
    Line: 0
    Char: 0
    Code: 0
    URI: http://localhost:2790/ExtTest.aspx
    Attached Files
    Last edited by geoffrey.mcgill; Feb 21, 2011 at 5:14 PM. Reason: please use [CODE] tags, [CLOSED]
  2. #2
    Hi jsdeveloper,

    I was able to reproduce the IE error, although you can easily work-around by moving the <ext:ResourceManager> component into your <form runat="server">.

    With future posts, just post your code samples directly into the forum post and wrap with [CODE] tags. Attaching as .zip is not necessary and prevents searching/indexing of your code which others might need to reference in the future.

    Here's a sample which demonstrates how to reproduce the error.

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <!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>
        <ext:ResourceManager runat="server" />
    </head>
    <body>
        <form runat="server">
        <div>
            <ext:Panel 
                ID="testPanel" 
                runat="server" 
                Height="500" 
                Width="500" 
                Visible="true" 
                Title="Hello?">
                <Content>
                    Hello World!
                </Content>
            </ext:Panel>
        </div>
        </form>
    </body>
    </html>
    Geoffrey McGill
    Founder
  3. #3

    Still Broken

    Unfortunately that did not solve our problem in our real project.

    This is the html rendered by a simple page in our project just like the one i sent you earlier. I'm wondering if there error has something to do with the fact that we are getting this DirectRequestModule error. However this error only appears when the resource manager is in the form tag, NOT when it is in the head tag.

    <script type="text/javascript">
    	//<![CDATA[
    		Ext.net.ResourceMgr.init({id:"testRM",BLANK_IMAGE_URL:"/Analytics/extjs/resources/images/gray/s-gif/ext.axd",aspForm:"form1",theme:"gray",appName:"Analytics"});Ext.onReady(function(){Ext.QuickTips.init();new Ext.Panel({id:"testPanel",contentEl:"testPanel_Content",renderTo:"testPanel_Container",height:500,width:500,title:"Hello?"});});
    	//]]>
    	</script>
    </Ext.Net.InitScript><Ext.Net.InitStyle>
    	<link rel="stylesheet" type="text/css" href="/Analytics/extjs/resources/css/ext-all-embedded-css/ext.axd?v=16211" />
    	<link rel="stylesheet" type="text/css" href="/Analytics/extjs/resources/css/xtheme-gray-embedded-css/ext.axd?v=16211" id="ext-theme" />
    </Ext.Net.InitStyle><Ext.Net.InitScript.Warning><script type="text/javascript">Ext.onReady(function(){Ext.Msg.show({title:'Warning',msg:'The <code>web.config</code> file for this project is missing the required DirectRequestModule.<br /><br /><div style="margin-left:48px;"><b>Example</b><br /><br /><code>&lt;system.web><br />&nbsp;&nbsp;&lt;httpModules><br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" /><br />&nbsp;&nbsp;&lt;/httpModules><br />&lt;/system.web></code><br /><br />More information available at "<a href="https://examples2.ext.net/?/Getting_Started/Introduction/Overview/">Getting Started</a>".</div><br />',buttons: Ext.Msg.OK,icon: Ext.MessageBox.WARNING});});</script></Ext.Net.InitScript.Warning>
        </div>
    This is in our web.config:

                <httpHandlers>
                    <add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false"/>
                </httpHandlers>
    
                <httpModules>
                    <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
                </httpModules>
  4. #4
    Hi,

    What IIS do you use with your real application?
  5. #5
    Hi,

    I see that Ext.Net http module is not executed because html contains <Ext.Net.InitScript> tag
    If you use IIS7 then please ensure that http handler and module is added to <system.webServer> section (IIS6 uses <system.web>)
  6. #6
    We are using IIS 5.1 on our dev maching and IIS 6 on our servers. We also have those modules in the <system.webServer> section of the web.config and this only is a problem when in the form tag so I don't think it is a config problem.

    Setup:
    IIS 5.1
    ASP.NET 3.5
    Visual Studio 2008
    Internet Explorer 8
  7. #7
    Hi,

    I'm wondering if there error has something to do with the fact that we are getting this DirectRequestModule error.
    Yes, it can be. Can you post the error?
  8. #8
    How come when the resource manager is placed inside the head it gets rendered to the form and placed inside the form it gets rendered to the head?

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title></title>
               <ext:ResourceManager ID="testRM" runat="server"></ext:ResourceManager>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <ext:Panel ID="testPanel" runat="server" Height="500" Width="500" Visible="true" Title="Hello?">
                <Content>
                    Hello World!
                </Content>
            </ext:Panel>
        </div>
        </form>
    </body>
    </html>
    OUTPUT:
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1"><title>
     
    </title></head>
    <body>
        <form name="form1" method="post" action="Default.aspx" id="form1">
    <div>
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTUwNDkwMDA0Mw9kFgICAw9kFgICAQ9kFgJmDxYCHgVjbGFzcwUIeC1oaWRkZW5kGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYCBQZ0ZXN0Uk0FCXRlc3RQYW5lbHhTYnYpmBGhur7y+wSCGDuduKJY" />
    </div>
     
    <script type="text/javascript"> 
    //<![CDATA[
    var theForm = document.forms['form1'];
    if (!theForm) {
        theForm = document.form1;
    }
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    //]]>
    </script>
     
     
    <div>
     
    	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKGyPBDAp+S1ZsK6tNMkmJNkuuWIK74DVEfLI36iXI=" />
    </div>
        <div>
            <div id="testPanel_Container">
    	<div id="testPanel_Content" class="x-hidden">
                    Hello World!
                </div>
    </div>
    	<link rel="stylesheet" type="text/css" href="/extjs/resources/css/ext-all-embedded-css/ext.axd?v=36328" />
    	<link rel="stylesheet" type="text/css" href="/extjs/resources/css/xtheme-gray-embedded-css/ext.axd?v=36328" id="ext-theme" />
    	<script type="text/javascript" src="/extjs/adapter/ext/ext-base-js/ext.axd?v=36328"></script>
    	<script type="text/javascript" src="/extjs/ext-all-js/ext.axd?v=36328"></script>
    	<script type="text/javascript" src="/extnet/extnet-core-js/ext.axd?v=36328"></script>
    	<script type="text/javascript">
    	//<![CDATA[
    		Ext.net.ResourceMgr.init({id:"testRM",BLANK_IMAGE_URL:"/extjs/resources/images/gray/s-gif/ext.axd",aspForm:"form1",theme:"gray"});Ext.onReady(function(){Ext.QuickTips.init();new Ext.Panel({id:"testPanel",contentEl:"testPanel_Content",renderTo:"testPanel_Container",height:500,width:500,title:"Hello?"});});
    	//]]>
    	</script>
     
        </div>
        </form>
    </body>
    </html>

    In this one the rm is in the form but gets rendered to the head:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ExtNetIE8Bug._Default" %>
    <!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></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
               <ext:ResourceManager ID="testRM" runat="server"></ext:ResourceManager>
            <ext:Panel ID="testPanel" runat="server" Height="500" Width="500" Visible="true" Title="Hello?">
                <Content>
                    Hello World!
                </Content>
            </ext:Panel>
        </div>
        </form>
    </body>
    </html>
     
    <!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">
    	<link rel="stylesheet" type="text/css" href="/extjs/resources/css/ext-all-embedded-css/ext.axd?v=36328" />
    	<link rel="stylesheet" type="text/css" href="/extjs/resources/css/xtheme-gray-embedded-css/ext.axd?v=36328" id="ext-theme" />
    <title>
     
    </title>
    	<script type="text/javascript" src="/extjs/adapter/ext/ext-base-js/ext.axd?v=36328"></script>
    	<script type="text/javascript" src="/extjs/ext-all-js/ext.axd?v=36328"></script>
    	<script type="text/javascript" src="/extnet/extnet-core-js/ext.axd?v=36328"></script>
    	<script type="text/javascript">
    	//<![CDATA[
    		Ext.net.ResourceMgr.init({id:"testRM",BLANK_IMAGE_URL:"/extjs/resources/images/gray/s-gif/ext.axd",aspForm:"form1",theme:"gray"});Ext.onReady(function(){Ext.QuickTips.init();new Ext.Panel({id:"testPanel",contentEl:"testPanel_Content",renderTo:"testPanel_Container",height:500,width:500,title:"Hello?"});});
    	//]]>
    	</script>
    </head>
    <body>
        <form name="form1" method="post" action="Default.aspx" id="form1">
    <div>
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJLTc0NDg4NDk3D2QWAgIDD2QWAgIDD2QWAmYPFgIeBWNsYXNzBQh4LWhpZGRlbmQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgIFBnRlc3RSTQUJdGVzdFBhbmVsm1YSEkAoD1BQFW2KDBPY8f4JpGY=" />
    </div>
     
    <script type="text/javascript"> 
    //<![CDATA[
    var theForm = document.forms['form1'];
    if (!theForm) {
        theForm = document.form1;
    }
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    //]]>
    </script>
     
     
    <div>
     
    	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgLqi/3vAgKfktWbConA1HXAeVZHDd7zyAo41YuphB3Z" />
    </div>
        <div>
               
            <div id="testPanel_Container">
    	<div id="testPanel_Content" class="x-hidden">
                    Hello World!
                </div>
    </div>
        </div>
        </form>
    </body>
    </html>
  9. #9
    Quote Originally Posted by Vladimir View Post
    Hi,


    Yes, it can be. Can you post the error?

    The generic DirectRequestModule error is being rendered:
    Here is the C# code from the rm that gets put on the screen:

    public const string WarningTemplate = "<Ext.Net.InitScript.Warning><script type=\"text/javascript\">Ext.onReady(function(){Ext.Msg.show({title:'Warning',msg:'The <code>web.config</code> file for this project is missing the required DirectRequestModule.<br /><br /><div style=\"margin-left:48px;\"><b>Example</b><br /><br /><code>&lt;system.web><br />&nbsp;&nbsp;&lt;httpModules><br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name=\"DirectRequestModule\" type=\"Ext.Net.DirectRequestModule, Ext.Net\" /><br />&nbsp;&nbsp;&lt;/httpModules><br />&lt;/system.web></code><br /><br />More information available at \"<a href=\"https://examples2.ext.net/?/Getting_Started/Introduction/Overview/\">Getting Started</a>\".</div><br />',buttons: Ext.Msg.OK,icon: Ext.MessageBox.WARNING});});</script></Ext.Net.InitScript.Warning>";

    It looks like we might have an issue where the rm cannot properly render itself to the head tag in our project. If we put the rm in the head or form it gets rendered to the form.
  10. #10
    Hi,

    It is not error message. It is mean that out http module is not attached and output html is not handled by our html module (by the way, the web.config in your test project which you posted doesn't contain http module)

    Does your head tag contains runat="server"?
Page 1 of 3 123 LastLast

Similar Threads

  1. [CLOSED] HTML Object Tag: Error when mixed with EXT.NET
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 08, 2011, 8:39 AM
  2. [FIXED] DirectEvent response xml parsing
    By r_honey in forum Bugs
    Replies: 2
    Last Post: May 07, 2011, 9:24 AM
  3. [CLOSED] [1.0] Json Webservice DateTime Parsing Error
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 04, 2010, 1:10 AM
  4. [CLOSED] Binding List(of Object) Parsing properties
    By CMA in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 24, 2009, 7:25 AM
  5. [CLOSED] Getting error setting HTML value in Label (IE Only)
    By Immobilmente in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 30, 2009, 1:12 PM

Tags for this Thread

Posting Permissions