change edit js function for global use, no longer per field