updated javascript post