add edit check functionality to the javascript process