2

I have a custom button added to SharePoint Ribbon. And there is EnabledScript attribute of the CommandUIHandler for the button. This attribute contains a javascript code to conditionally disable/enable the button. Can I set a tooltip message that show up when user moves the mouse over a button when it is disabled?

2
  • You can set the ToolTipTitle and ToolTipDescription of the <Button> element to show tooltip on your custom button and they show even when the button is disabled. Or do you want the tooltip to be shown only if button is disabled.
    – Naveen
    Commented Jan 30, 2015 at 8:35
  • Naveen, thanks for your comment. Yes, I would like to show it only if button is disabled. But if there is no way to do it I will just put more information to ToolTipTitle/ToolTipDescription.
    – Serhiy
    Commented Jan 31, 2015 at 10:20

1 Answer 1

0

You can use the HTML title attribute of your custom button. Set it dynamically on basis of whether it is enabled or disabled. You can bind onmouseover event to the button, where you will be resetting the title attribute dynamically.

1
  • 1
    Hm, I am not sure how I can specify any HTML attributes of the ribbon button. Do you have any example?
    – Serhiy
    Commented Dec 10, 2014 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.