+ Start a Discussion

Content from VF page is not being displayed

Hello All, 

I have a command button that calls VF page. Below is the code. The content is not being pulled. Any help is greatly appreciated.


function openSearchPage(){

            var primaryTabName = 'SearchTab';

            sforce.console.focusPrimaryTabByName(primaryTabName, focusSuccessSearch);


        var focusSuccessSearch = function focusSuccessSearch(){

             sforce.console.openPrimaryTab(null, '/apex/VF_Search_Page', true, 'SearchTab'); 



<apex:commandButton value="Search Account" 


                        onclick="openSearchPage();return false;"/>


When I add VF_Search_Page directly into my app, it works. But not from a command button. Any help would be greatly appreciated.