+ Start a Discussion
Tobias HaggeTobias Hagge 

Call button/link in same window

Hey, I want to call a standard button from a Visualforce page in the same window of the Service Cloud Console, but it opens the link a new browser window. The standard button/link on the page works fine, just the calling from java does not work properly.
 
<apex:pageBlockButtons location="top" id="pbbID9">
            <apex:commandlink value="Email_Default_Notice_Ltd" action="{!URLFOR($Action.Account.View,Account.Id)}" onclick="openConga()" rerender="pbbID9" target="_blank"/>
</apex:pageBlockButtons>

    <script Language="JavaScript">
        function openConga() { window.open('{!URLFOR($Action.Account.Email_Default_Notice_Ltd,Account.Id)}', '','scrollbars=yes,menubar=no,height=600,width=800,resizable=yes, toolbar=no,location=no,status=yes'); }  
    </script>

Any idea how to modify? I tried all target="_blank" self, etc.
Best Answer chosen by Tobias Hagge
Tobias HaggeTobias Hagge
Changing it to the following works and doesn't even require java
<apex:pageBlockButtons location="top" id="pbbID9">
            <apex:outputLink value="{!URLFOR($Action.Account.Email_Default_Notice_Ltd,Account.Id)}"> Email Default Notice Ltd 
            </apex:outputLink>
</apex:pageBlockButtons>