refactoring ajax on Dialogue and Request