Search dialog box

If we create Search dialog box through coding , what i need to add to the code to make search clear every time when user search?  
Parents Reply Children
No Data