updating with java script