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.


This is great. I have used this but ran into an issue.

I disabled the Back toolbar icon for a certain script/page. But if the user decides to leave and go directly to the Home script/page, Back remains disabled for all scripts/pages (not just the Home page, as it should). One solution is to enable Back within the Home script/page, but this nullifies the correct action where Back should be disabled on the Home page. I could enable Back on all pages called from the Home page, but that seems kind of silly. Or maybe that’s what I have to do.

There may be a better way, but I have had to use the disable/enable on pages to make things work right. Not best solution but many times I have to move forward and cannot wait on solutions from support.

Maybe support will have a better solution?

Yes. I tried a jQuery script (using beforeunload) to check when leaving a page (and do an enable), but the toolbar action kept it from firing.

I am not in my “office” and away for the summer so cannot access all my files. Looking on local drive to see if I might have a copy of how I setup my buttons. Lot of time has passed and cannot remember exactly what I did. Will keep looking…