how to call call method from one js file to another?

Posted by Gow.Net under JavaScript on 7/12/2013 | Points: 10 | Views : 1413 | Status : [Member] | Replies : 1
HI

I have two js file (a.js,b.js)

 a.js

function abcMethod(a,b,c){
//some cod
}


how can i call that method(abcMethod) from a.js to b.js

gowthaman8870226416


Responses

Posted by: Jitendrasoft09 on: 7/12/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi,

You can call method from one js file to another. Need to put your another js file into URL, and access those methods.

//file1.js

button.addEventListener('click', function()
{
var secondWindow = Ti.UI.createWindow({
url:'file2.js'
});
secondWindow.open();

});

Refer below link for more information-
http://stackoverflow.com/questions/17286894/titanium-calling-a-function-in-one-js-file-from-another-js-file

Hope you are clear..

Jitendra Kumar
If my post helps you, plz mark as an answer.

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response