01-21-2018 03:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-21-2018 03:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I was trying to enable/disable a top-right combo button. Here's a list of things that confused me:
1. I cannot disable a combo button via JavaScript. I've tried the following:
btn.enabled = false btn.disabled = true btn.style.enabled = false btn.style.disabled = true btn.enable = false btn.disable = true btn.style.enable = false btn.style.disable = true
and none of them worked. How can I do this?
2. Since none of the methods worked on disabling the button, I set the button's visibility to "hidden" to hide the button. However, I still caught the 'activate' event of the corresponding hardware button when it's pressed. Is there any way that I can disable the hardware button?
Thanks!
Answered! Go to the Best Answer.

Accepted Solutions
01-22-2018 08:50 - edited 01-24-2018 07:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
01-22-2018 08:50 - edited 01-24-2018 07:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You can use
document.disable();
See documentation at https://dev.fitbit.com/build/reference/device-api/document/#interface-combobutton-
01-22-2018 08:50 - edited 01-24-2018 07:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
01-22-2018 08:50 - edited 01-24-2018 07:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You can use
document.disable();
See documentation at https://dev.fitbit.com/build/reference/device-api/document/#interface-combobutton-
01-23-2018 08:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-23-2018 08:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Thanks! That's what I'm looking for! Forgive me for not reading the document clearly :p. However I'd like to point out that the boolean argument for the method is used to choose whether the item should be animated, not whether it should be disabled. Here's the code snippet for enable/disable the button:
btn.disable() // Disable the button btn.enable() // Enable the button
01-24-2018 07:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
01-24-2018 07:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Good point!

