display search items in a particular view - using customized button issue

i have created a new button and when i click on that new button i'm getting the results correctly. But if i select a particuler view and then search i'm not getting the result. i have a java script which i call when i click on that button. also the action in that button is do nothing. in the rad i'm using se.search.engine and passing the query which is retriving the data correctly. now i want to know why if i select a view and search using my button its not displaying the results in that view? Please help Regards, Kut