1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    46
    Vote Rating
    0
    Tina G is on a distinguished road

      0  

    Arrow Include two .js files into a js file

    Include two .js files into a js file


    Hi:

    I have a T1.jsp that has within its script tag T1.js. Now in my T1.js I want to include two other files JS1.js and JS2.js.

    How changes do I make in my T1.js?

    My T1.js has a tree and JS1.js and JS2.js each has a grid. The records from these two grids need to be dropped onto the tree.

    Any suggestions?

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,546
    Vote Rating
    64
    Animal is a jewel in the rough Animal is a jewel in the rough Animal is a jewel in the rough

      0  

    Default


    Confoozed? You will be!

    T1.jsp has

    Code:
    <script type="text/javascript" src="T1.js"></script>
    ?

    Because T1.js (If it is indeed a javascript file) can't "include" anything.

    If you are loading javascript from a servlet, give it a URL which doesn't hide that fact so we know aht you are doing, eg

    Code:
    <script type="text/javascript" src="T1.getjs"></script>
    Is that the case, that the "T1.js" URL maps to a servlet?

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    46
    Vote Rating
    0
    Tina G is on a distinguished road

      0  

    Exclamation


    My data in the two grids is getting loaded from an xml file. The tree initially is empty; or has just the root node. The records are dragged from the two grids and dropped onto the tree.

    The .jsp is T1.jsp
    The tree is contained in T1.js
    The grids are contained in JS1.js and JS2.js

    Is this doable; including JS1.js and JS2.js in T1.js?

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,546
    Vote Rating
    64
    Animal is a jewel in the rough Animal is a jewel in the rough Animal is a jewel in the rough

      0  

    Default


    I think you are trying to run before you can walk.

    Have you managed to create a Layout on your page yet? Or show a dialog?

Thread Participants: 1