0

Sorry for my English, it is not my native tongue...

I have a my_js.js file that all my asp pages include. Now this page needs to use jQuery. I do not want to add any script tags to my .asp page, i.e. <script src="jquery.js />

I want the my_js.js to include the jQuery file

I saw an answer in How to include a JavaScript file in another JavaScript file? (the first answer)
that with JavaScript, it can fail without jQuery

However, this page does not know about jQuery
And that's exactly what I want to do include!!!

Please can someone tell me what I should do?

Community
  • 1
  • 1
lealam
  • 247
  • 2
  • 8
  • 20

2 Answers2

0

check netplus article

in this many solution to add dynamic files

and thanks to Ways to add javascript files dynamically in a page

or can use simple

 document.write('<' + 'script src="' + src + '"' +
                   ' type="text/javascript"><' + '/script>'); // in src path of jquery file

and you can use jQuery.getScript() function....i think it will be much easier to you wd this to include a js file.

Community
  • 1
  • 1
Rituraj ratan
  • 9,599
  • 7
  • 32
  • 51
  • But that's exactly my problem, If the browser works asynchronously so my page will load before the alleged JQUeRY it will not work – lealam Oct 01 '13 at 05:56
0

Give the reference of jquery file greaterthan sign and lessthan sign not wotked in this editor,you replace the world by symbol below example
eg. /// greaterthan reference path="my_js.js" close lessthan

type this in jquery.js

Mahesh Gaikwad
  • 569
  • 1
  • 5
  • 9