Editing Open Multiple Subtabs

Available in: Salesforce Classic

This is part of Developing with the Service Cloud.

You can find out more on how to use this Visualforce page here.

<apex:page showHeader="false" sidebar="false" standardController="Case">
   <apex:includeScript value="/support/console/20.0/integration.js"/>
   <script type="text/javascript">     

       var openSubtabTimer = null;
       
       function openGoogleSubtab() {
       
           // Use the results primary tab id and open a new subtab 
           var openSubtab = function(result) {               
                sforce.console.openSubtab(result.id,'https://encrypted.google.com/search?q={!case.subject}',false,'Search Results...');           
                clearTimeout(openSubtabTimer);
            };
            // Get the enclosing primary tab id. The openSubtab method is set as the callback
            sforce.console.getEnclosingPrimaryTabId(openSubtab);
       }       
      
       var previousOnload = window.onload;        
       window.onload = function() { 
            if (previousOnload) { 
                previousOnload();
            }                
           openSubtabTimer = setTimeout('openGoogleSubtab()', '500'); 
       }
   </script>
</apex:page>