I understand that you wish to have search on the visualforce page which takes Account name/contact name and gives the related opportunity:
Please refer to the following blog which gives sample code to get the dynamic search working: http://blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/ http://salesforce.stackexchange.com/questions/25879/dynamic-search-using-visualforce-page
Please refer to the following blog which gives sample code to get the dynamic search working:
http://blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/
http://salesforce.stackexchange.com/questions/25879/dynamic-search-using-visualforce-page