I am using AJAxsolr framework for building my search UI. I have an index file which is an html file. This file has all the necessary script imports that import the javascript files. I have a javascript file script1.js which has a function as follows:
function myfunction(){
//Do the necessary stuff
}
I have another js file mywidget.js which is my custom widget. It has the following function:
(function ($) {
AjaxSolr.MyWidget = AjaxSolr.AbstractTextWidget.extend({
init: function(){
}
// and other functions
}
});
I want to call the function myfunction() in script1.js from the mywidget.js file. I tried the $.getScript() function but couldn't get to call the function. Can someone help me on this please?
Thank you!
myfunction
is defined above where you are calling it, and you should be fine. – Tim Mac Jul 26 '13 at 17:48