Hiding the OBIEE top banner on click button


Requirement is to hide OBIEE top banner because sometime top banner take extra or unnecessary vertical spaces which client may not like.

Here is what is present :

1-9-2018 11-24-00 AM

So clicking on button “Hide top Pane” should hide the OBIEE top banner .

Just add new text section in dashboard layout and mark as HTML markup. Add below JS code:

This will work like toggling through the button and once you click it will hide top pane and click again to show it again.


var isHidden = false;
function loadToggleAction() {
var sheet = document.createElement(‘style’)
if(!isHidden){
sheet.innerHTML = “.HeaderContainer {display:none;}”;
}else{
sheet.innerHTML = “.HeaderContainer {display:block;}”;
}
document.body.appendChild(sheet);
isHidden = !isHidden; //This will change the value to the opposite
}

<form>
<input type=”button” id=”dxp” class=”button” value=”Hide top Pane” onclick=’javascript: loadToggleAction();’ />
</form>

See the image how it should be : (add script tag and end script tag in proper place)

1-9-2018 11-51-47 AM