You are using request.onSuccess after the db has already opened move, so the event never fires. What you need to do is you need to move the handler setup outside the click function
request.onSuccess