Sign in to follow this  
mikegiddens

this scope delegate issue for link=javascript

Recommended Posts

I am looking for a way to not call functions to the window document but to the map object or some other specified scope.

 

 

 

 

var map = new FusionMaps(this.fusionmapPath + mapInfo.swf, mapInfo.swf, mapInfo.width, mapInfo.height, this.debug, "0");

 

map.setDataURL( {dataurl} );

 

map.render(this.body.dom);

 

map.newFunction = function( data ) {

 

console.log("This is my data", data);

 

}

 

 

 

 

if I do a basic log in FF I get Window to be this and the scope of the object.

 

 

< entity id="AL" value="1270" link="JavaScript:console.log(this, 'AL', 'Alabama', 'AL', 'Tuscaloosa County');">

 

 

 

 

My question is:

 

Is there any way to change the scope of this to be something else when the Javascript is called?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this