View Full Version : Call JS Function

18 Apr 2007, 8:22 AM
Hi All...

Help me...

How to call JS function between JS file?


18 Apr 2007, 8:32 AM
kinda of an odd question but ....

You would in include the files necessary to call? What I do is keep things in a name space-ish so I know exactly where my functions reside. For instance, take a look at the sample.

dog = {
bark : function() {
alert("woof woof");

cat = {
meow : function() {

then here I can do dog.bark() or cat.meow(). That way, I know where my functions reside. If your file gets a little long with:

function one() {}
function two() {}
function three() {}
function four() {}
function five() {}

things then tend to get a little confusing.

my 2cent.