Making dynamic url for js