Results 1 to 7 of 7

Thread: Include .js in html

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Milan
    Posts
    7

    Default Include .js in html

    Hello everyone.

    I am starting to use Ext Designer, I am trying it with my colleagues.
    This is the problem:

    When I edit and export the demo project (the Cars one, downloadable from the site), the xds_index.html contains all the <script type> tags I need to inclued all needed files.
    Code:
        <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.0/adapter/ext/ext-base.js"></script>    <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.0/ext-all-debug.js"></script>
        <script type="text/javascript" src="CarMasterDetail.ui.js"></script>
        <script type="text/javascript" src="CarMasterDetail.js"></script>
        <script type="text/javascript" src="carStore.js"></script>
        <script type="text/javascript" src="xds_index.js"></script>
    When I try to export a simple project I created to test Designer, these tags do not appear in my designer.html generated file:
    Code:
        <script type="text/javascript" src="http://extjs.cachefly.net/ext-4.0.2a/ext-all-debug.js"></script>
        <script type="text/javascript" src="designer.js"></script>
    They appear only in designer_includeOrder.txt file, and I have to copy them manually each time I export files:
    Code:
    <script type="text/javascript" src="app/view/ui/MyContainer.js"></script><script type="text/javascript" src="app/view/MyContainer.js"></script>
    <script type="text/javascript" src="app/store/provaStore.js"></script>
    Is there any setting I need to configure?

    Thank you.

    Stefano

  2. #2
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    31

    Default I'm having the same problem...

    Anything in the designer_includeOrder text file is not being included in the designer.html file. The Preview in Ext Designer works fine, but when attempting to view it through the browser it is a blank white page with only this in the source:
    Code:
    <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-4.0.2a/resources/css/ext-all.css"/>
      <script type="text/javascript" src="http://extjs.cachefly.net/ext-4.0.2a/ext-all-debug.js"></script>
      <script type="text/javascript" src="designer.js"></script>
    I end up with a console error of:
    Code:
    c is not a constructor
    this.instantiators[len... 'return new c('+args.join(',')+')');
    ext-all-debug.js (line 3808)
    Once I add the include script tags from designer_includeOrder then the app runs perfectly.

    My concern is the that designer.html gets overwritten on each export and I shouldn't have to keep pasting in the includeOrder script tags.

    Please advise!

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Location
    Milan
    Posts
    7

    Default

    Nobody could help us? :-(

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    s.gatti and freshyseth -

    Sorry for the delay in reply. These classes should be being loaded dynamically in development mode.

    Could you post a sample project that illustrates the issue?
    Aaron Conran
    @aconran

  5. #5
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Looking through some other peoples issues that they are having, my guess is that you are not running your project from a webserver.

    Are you directly attempting to load this via the filesystem?

    Move the project deployment directory to a web server like C:\Inetpub\wwwroot, ~/Sites/, ~/www, etc depending your environment and load up the project in your browser via http.

    http://localhost/myproject/

    This is a browser security restriction that you are running into.
    Aaron Conran
    @aconran

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Location
    Milan
    Posts
    7

    Default

    Quote Originally Posted by aconran View Post
    Are you directly attempting to load this via the filesystem?
    Yes I am.
    Thanks for your clarification.

    I will do as you suggest.

    Stefano

  7. #7
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    31

    Default FIXED: Deploy system via web server

    aconran's solution did correct my issue. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •