Calling a javascript function in post edit page after attaching something to post

did you try the image editor class hooks?

try: image_editor_save_pre

more information about the hooks changes:
http://make.wordpress.org/core/2012/12/06/wp_image_editor-is-incoming/

http://codex.wordpress.org/Class_Reference/WP_Image_Editor