[CLOSED] The Ext.NET initialization script was not found.

  1. #1

    [CLOSED] The Ext.NET initialization script was not found.

    In my solution, I have a Ext.Net page (See Figure 01) that is created in a javascript function, see figures 02 and 03.

    Now, I want to show my ext.net page into a Jquery modal.

    I did this in the site.master file:

    <div id="divModalTelaMenu"></div>
    
    <script>
        function AbrirTelaModal() {       
                $("#divModalTelaMenu").load($.url_action({ controller: "CaixaEscolar/CNAECX", action: "Index"}));                
                $("#divModalTelaMenu").wijdialog("open");
            }
    </script>
    The page is called, but don't work. see figure 04.



    Click image for larger version. 

Name:	Figura01.png 
Views:	168 
Size:	63.5 KB 
ID:	5162Click image for larger version. 

Name:	Figura02.png 
Views:	166 
Size:	47.6 KB 
ID:	5163Click image for larger version. 

Name:	Figura03.png 
Views:	162 
Size:	36.3 KB 
ID:	5164Click image for larger version. 

Name:	Figura04.png 
Views:	172 
Size:	40.7 KB 
ID:	5165
    Last edited by Daniil; Nov 26, 2012 at 11:01 AM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hello!

    Can you post the standalone example of your problem to reproduce?

    http://forums.ext.net/showthread.php?3440
    http://forums.ext.net/showthread.php?10205
  3. #3
  4. #4
    Hi @romeo,

    I think the posted code contains too many irrelevant to the problem things.

    Any code which is not directly related to the problem should be removed from a sample. Please take a note.


    This exception
    The Ext.NET initialization script was not found
    can occur if the page was cached.

    Did you set up this for the ResourceManager?
    InitScriptMode="Linked"
    If yes, please try to remove.
  5. #5
    In my Site.Master I have a div <div id="mydiv"/>, and I want to do this:
    $("#mydiv").wijdialog("open");

    Load another page (page1) into the mydiv as a modal.

    I think that this error is because in my Site.Master I have a tag
    <ext:ResourceManager ID="ResourceManager1" runat="server" CleanRequestUrl="false"/>

    and I have this tag in page1 too.

    But don't work without the ResourceManager, but with them this error is showed:
    The Ext.NET initialization script was not found.
  6. #6
    I guess initScriptMode is defined in web.config in extnet section
    Just remove that attribute and retest
  7. #7
    Sorry, @romeu, I am not sure what exactly your source code is doing because it's so complicated and has many unrelated to your problem things. However, look at following example:

    MasterPage
    <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="ExtNetMvcApplication.Views.Shared.Site1" %>
    <%@ Register TagPrefix="ext" Namespace="Ext.Net" Assembly="Ext.Net" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title></title>
        <!--jQuery References-->
        <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min.js" type="text/javascript"></script>
        <!--Wijmo Widgets JavaScript-->
        <script src="http://cdn.wijmo.com/jquery.wijmo-open.all.2.0.0.min.js" type="text/javascript"></script>
        <script src="http://cdn.wijmo.com/jquery.wijmo-complete.all.2.0.0.min.js" type="text/javascript"></script>
        <!--Theme-->
        <link href="http://cdn.wijmo.com/themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" title="rocket-jqueryui" />
        <!--Wijmo Widgets CSS-->
        <link href="http://cdn.wijmo.com/jquery.wijmo-complete.all.2.0.0.min.css" rel="stylesheet" type="text/css" />
        <asp:ContentPlaceHolder ID="head" runat="server">
        </asp:ContentPlaceHolder>
    </head>
    <body>
        <form id="form1" runat="server">
            <div id="dialog" title="Basic dialog">
            </div>  
            <ext:ResourceManager  runat="server" />
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                
            </asp:ContentPlaceHolder>
        </form>
    </body>
    </html>

    Index.aspx

    <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site1.Master" Inherits="System.Web.Mvc.ViewPage" %>
    <%@ Register TagPrefix="ext" Namespace="Ext.Net" Assembly="Ext.Net" %>
    <asp:Content runat="server" ContentPlaceHolderID="head">
        <script>
            $(document).ready(function () {
                $('#dialog').wijdialog({contentUrl: 'http://ext.net'});
              });
        </script>
    </asp:Content>
    <asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
        
    </asp:Content>
    Test.aspx
    <%@ Page Title="Title" Language="C#" Inherits="System.Web.Mvc.ViewPage"%>
    
    <%@ Register TagPrefix="ext" Namespace="Ext.Net" Assembly="Ext.Net" %>
    
    <ext:ResourceManager runat="server"></ext:ResourceManager>
    <ext:Button runat="server" Text="Some Button"></ext:Button>
    Controller
    public class HomeController : Controller {
    	public ActionResult Index() {
    		return View();
    	}
    
    	public ActionResult Test() {
    		return View();
    	}
    }
    The main idea is to use Dialog in iFrame mode which should resolve your problem.

    If you will continue experiencing this problem, please, try to use this example to show your problem
    Last edited by Baidaly; Nov 26, 2012 at 12:19 AM.
  8. #8
    Hello @ Baidaly!

    Did the way you mentioned and it worked correctly, thanks!

Similar Threads

  1. Resource Handler / Ext.NET initialization
    By Justin_Wignall in forum 1.x Help
    Replies: 0
    Last Post: Jul 27, 2012, 8:30 AM
  2. [CLOSED] The Ext.NET initialization script was not found
    By Stefanaccio in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 19, 2011, 1:57 PM
  3. [CLOSED] Ext.NET initialization script was not found
    By Justin_Wignall in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Mar 23, 2011, 10:10 AM
  4. [CLOSED] [1.0] DisplayField Value initialization
    By smmille1 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 15, 2010, 11:31 PM
  5. [CLOSED] combo boxes initialization
    By alexp in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 04, 2010, 11:11 AM

Posting Permissions