I keep getting "MyControl.disp layMyWayPoint is not a function" error
basically I create a table on the fly. Each row has a button with an onclick( ) event handler that I want to call the function displayMyWayPoi nt( ) in the proto typed control.
How do I do that?
Code:
var Class = { create: function() { return function() { this.initialize.apply(this, arguments); } } } var MyControl = Class.create(); MyControl.prototype = { ...more code above... displayMyWayPoint: function() { this.mc.map.clearOverlays(); this.mc.drawMyWaypoint("41.880150027573109","-87.80519999563694"); }, ... more code below ..... } td.innerHTML = '<input type="button" id="'+waypointObject[i].waypoint+'btn" value="Map it" onclick="MyControl.displayMyWayPoint('+waypointObject[i].lat+','+waypointObject[i].lon+');"/> '+(s+1)+".";
How do I do that?
Comment