Application requests KML data through AJAX from server. This data is stored in javascript variables, and displayed in Google Earth plugin.
In javascript, how do I
Frankly, I don't think this is possible. It was never intended that this could be done in javascript.