Disable Home Button

I see this: Hide show toolbar button

What I need to do is disable (or even hide, but rather disable) the “Home” toolbar button on certain loaded pages. Need Home button active, but some pages not.

IS this possible? If so, could someone kindly provide the code to use in PHP page?


Sure, it’s possible. However, is it a button on a ribbon or on a toolbar?

For instance, for the toolbar component named “toolbar1”, you can hide the home button named BHome with that HEScript function (to be placed into UserMain):

procedure Procedure2;
SetUIProp("Toolbar1BHome", "Enabled", "FALSE");

And then invoke this Procedure2 from PHP with the appropriate PHP function to run HEScript (search in doc).


Had tried this (your example) based on thread I mentioned. I must have made a mistake in my PHP code somewhere.

Yes, it was my fat finger PHP code. Works fine, thank you.

EDIT / UPDATE: Not working as expected. I am placing this at top of a PHP page:

<?php exo_return_hescriptcom("UserMain.DisableHome", "FALSE"); ?>

Have tried a few variations and it does disable the Home button, but seems to lock up the rest of content on page.

My script:

procedure DisableHome;
SetUIProp("Toolbar1scButton2", "Enabled", "FALSE");

Could you please point out what I am doing wrong?

Switched to javascript and seems to solve the php issue, but still like some input on PHP for future reference.

PHP isn’t a good solution to modify the UI because it is run in a different process. JavaScript is definitively the best solution.

Do you mind sharing how you would do this in javascript only? Like to see your version of solving this issue.

For instance, if you have JQuery, you can do:

$(document).ready(function() {

That is where I was going wrong, just trying plain javascript and could never get it working.