shindig-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Houghton <de...@chuwori.co.uk>
Subject javascript question
Date Wed, 20 Jul 2011 20:55:20 GMT

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


Mime
View raw message