JS submit modified data only