setTabTitle()
構文
1sforce.console.setTabTitle(tabTitle:String, (optional)tabID:String)引数
サンプルコード – Visualforce API バージョン 20.0 以降
1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<apex:page standardController="Case">
18 <A HREF="#" onClick="testSetTabTitle();return false">
19 Click here to change this tab's title</A>
20
21 <apex:includeScript value="/support/console/20.0/integration.js"/>
22 <script type="text/javascript">
23 function testSetTabTitle() {
24 //Set the current tab's title
25 sforce.console.setTabTitle('My New Title');
26 }
27 </script>
28</apex:page>応答
なし
サンプルコード – Visualforce API バージョン 25.0 以降
1swfobject.registerObject("clippy.codeblock-2", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<apex:page>
18 <A HREF="#" onClick="testSetTabTitle();return false">
19 Click here to change the title of the focused primary tab</A>
20
21 <apex:includeScript value="/support/console/25.0/integration.js"/>
22 <script type="text/javascript">
23 sforce.console.getFocusedPrimaryTabId(function(result){
24 sforce.console.setTabTitle('My New Title', result.id);
25 });
26 </script>
27</apex:page>応答
なし