support for more complex javascript dialog transition