Hi,
I have a javascript file with nested functions as shown below. It is external 
to the gadget.

How can I call the nested function (stg_run) from within the gadget?

from within gadget: 
emouseatlas.emap.RunMe.stg_run(jso);

Thanks
Derek

//---------------------------------------------------------
//   Namespace:
//---------------------------------------------------------
if(!emouseatlas) {
   var emouseatlas = {};
}
if(!emouseatlas.emap) {
   emouseatlas.emap = {};
}


//---------------------------------------------------------
// module for testing from a social gadget
// encapsulating it in a module to preserve namespace
//---------------------------------------------------------
emouseatlas.emap.RunMe = function() {
        var _debug=true;
        stg_run =  function(url) {
        
                //output to firebug  
                if(_debug) {
                         console.log("inner scope stg_run %s",url);
                }       
        };//end stg_run
}();//end RunMe

Reply via email to