Add JS code to call posts action.