Hello,
I am trying to pass in a function as a parameter:
GEvent.addListener(marker_1, "click", populateMarkerWindow(0, marker_1) );
the addListener function takes an inline function as a parameter, and it works fine, but I want to call this function from other places as well, so I made it into a defined function:
var populateMarkerWindow = function(id, marker) {
//...
}
This, however, only means that my function gets called when I try to register it.
Is there a way to tell JS that I want to pass in the function itself, not the result of the call to the function?
Thank you,