Add ajax event to control new record page