By default I want my inline visual force section to be collapsed.I can only see show scrollbar,Height,Width and Show label under pagelayout settings.I know salesforce remembers the collapsed state.But In my case I always want my inline visual force section to be collapsed.How to achieve this.
Update
I have created a hidden visualforce page(Zero height/Width) with Javascript code for collapsing my inline visualforce section on pageload and added it to page layout, but its not working.Can some one help me where I am going wrong.
<apex:page standardController="Account">
<script language="javascript">
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
function dotest() {
if(document.getElementById('{!$Component.head_01B3000000CARvA_ep}') != null){
twistSection(document.getElementById('{!$Component.head_01B3000000CARvA_ep}').childNodes[0].childNodes[0]);
}
}
addLoadEvent(dotest);
</script>
</apex:page>
Attribution to: sfdc
Possible Suggestion/Solution #1
This knowledge article gives an Idea on how to collapse the Pageblocksection by default.If you have the inline components in a separate pageblock section you can do the following to collapse it by default.
http://help.salesforce.com/apex/HTViewSolution?id=000181821&language=en_US
Attribution to: Rao
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/32786