added necessary javascript to client page