dialog return the element