Dialog windows open conditionally

Dialog windows don't load scripts.