I would like to create a file called util.js. Now i put some functions in there, which i will need often. And I now would like to usw this functions in all my other javascript files.
I thought this has something to do with Ext.ns('...') but seems not to be right.
mhm seems that I got it. I now use namespace and do something like that:
Ext.namespace("bla");
bla = function(){
//do some stuff
}
if I initialize this utilities js file in the html file BEFORE I use my main js file, i can use it there.
Just one question remains:
is there a possibilities to init the utilities file from another javascript file, or do i have to init this like <scrip language="text/javaScript" src=""></script> in the html file?
So that means I have to add the <script language="text/javascript"...> tag into the html file. I cant load the js file like I do in Java (Utilities u = new Utilities())
Right?
Is the namespace thing a good possibility to use Methods in other javascript files?
If you're asking about dynamically loading javascript files, there are ways to do this. I suggest you spend some time reading the http://extjs.com/learn, so you have a better understanding and can formulate some questions that make clear what you're trying to accomplish.