Modify field.js with ajax functions