Use Ajax layout when appropriate when sending messages