created a dialog that will pop an error if a non target is selected