complete javascript with another events