So i followed some guidelines and i created a custom-googlev3.js and used this function
GeoMashup.addAction( ‘selectedMarker’, function( properties, marker, map ) {
var objects = GeoMashup.getMarkerObjects( marker );
if ( objects.length > 0 && GeoMashup.have_parent_access ) {
// i used window.parent so that i can call the scripts from the iframe parent
window.parent.ajax_post_modal(objects[0].object_id);
}
});