Dialog windows open conditionally

Dialog windows do not load scripts any more.