Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Including .js file into another .js file?

MoeeN AhmaDMoeeN AhmaD Member Posts: 3
Can anyone help me out in including a js file in another js file. I have a js file that is already included in my whole site, now i would like to add 1 more js file into my site, what could be the solution?

Comments

  • zibadianzibadian Member Posts: 6,349
    : Can anyone help me out in including a js file in another js file. I have a js file that is already included in my whole site, now i would like to add 1 more js file into my site, what could be the solution?
    :
    All external files, which are included in the same html file using the tag, can make use of one and another. Thus:
    [code]


    [/code]
    functions in two.js can call functions defined in one.js, and vice versa.
  • MoeeN AhmaDMoeeN AhmaD Member Posts: 3
    : : Can anyone help me out in including a js file in another js file. I have a js file that is already included in my whole site, now i would like to add 1 more js file into my site, what could be the solution?
    : :
    : All external files, which are included in the same html file using the tag, can make use of one and another. Thus:
    : [code]
    :
    :
    : [/code]
    : functions in two.js can call functions defined in one.js, and vice versa.
    :

    ThanX but i wana include "two.js" in "one.js", coz i have many files in my website, i cant edit all these, so i think the better way will be to include it in "one.js". Hope i'll get what i want!

  • zibadianzibadian Member Posts: 6,349
    : : : Can anyone help me out in including a js file in another js file. I have a js file that is already included in my whole site, now i would like to add 1 more js file into my site, what could be the solution?
    : : :
    : : All external files, which are included in the same html file using the tag, can make use of one and another. Thus:
    : : [code]
    : :
    : :
    : : [/code]
    : : functions in two.js can call functions defined in one.js, and vice versa.
    : :
    :
    : ThanX but i wana include "two.js" in "one.js", coz i have many files in my website, i cant edit all these, so i think the better way will be to include it in "one.js". Hope i'll get what i want!
    :
    :
    As far as I know, that's impossible. But perhaps you can find more info on www.w3schools.com.
  • aaronjones3593aaronjones3593 Member Posts: 122
    : : : : Can anyone help me out in including a js file in another js file. I have a js file that is already included in my whole site, now i would like to add 1 more js file into my site, what could be the solution?
    : : : :
    : : : All external files, which are included in the same html file using the tag, can make use of one and another. Thus:
    : : : [code]
    : : :
    : : :
    : : : [/code]
    : : : functions in two.js can call functions defined in one.js, and vice versa.
    : : :
    : :
    : : ThanX but i wana include "two.js" in "one.js", coz i have many files in my website, i cant edit all these, so i think the better way will be to include it in "one.js". Hope i'll get what i want!
    : :
    : :
    : As far as I know, that's impossible. But perhaps you can find more info on www.w3schools.com.
    :
    He's right; It's not possile for JavaScript to include another JS file like ASP can. You will have to have a search and replace for your pages in NotePad or something similar...

    Search for:
    Replace with:

    Sorry,


    -( Aaron )-

    "Alcohol aint the answer, but atleast you forget the question"

Sign In or Register to comment.