Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Combo button weird behavior

ANSWERED

I am trying to replicate the way buttons work for a fitibit exercise, on my own activity (Ps a sample of it would be great). Anyhow, I am experiencing a bit of an illogical behavior, and I was wondering if it is a bug.

 

Behavior 1:

If I set in the index,gui

     <set href="combo-button-stroke" attributeName="display" to="inline"/>

then in the app index

     myButton.style.display = "none";

Button is not displayed, and it does NOT work.

If I activate it using a function to 

     myButton.style.display = "inline";

then it works

 

Behavior 2:

If I set in the index.gui

     <set href="combo-button-stroke" attributeName="display" to="none"/>

 

Button is not displayed, BUT it does work.

     myButton.style.display = "inline"; or "none"

 

only change display or not, but it always works.

 

Feedback on this is welcome.

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

 

You're changing the style.display of the button, but you're calling <set> on just the stroke line of the button, not the button itself.


To hide the whole button, set the display property on the button.

  <use id="myButton" href="#combo-button-upper-right" display="none">

Or via javascript

myButton.style.display = "none";

 

 

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

 

You're changing the style.display of the button, but you're calling <set> on just the stroke line of the button, not the button itself.


To hide the whole button, set the display property on the button.

  <use id="myButton" href="#combo-button-upper-right" display="none">

Or via javascript

myButton.style.display = "none";

 

 

Best Answer
0 Votes