. show() is not a function

I’ve been having a problem with the following error in the code below ‘x is not a function’.
The commented out lines are things that I tried that did not stop the error message.
Anyone have an idea what I could try next? Currently i am just using the ‘.hidden = true/false’ but I’d still like to know why the other doesn’t work.

Thanks.

'Function Main - this does not prevent the error messages below
MACaddress = localStorage.data 
'Function frmMain_onshow() - this does not prevent the error messages below
If MACaddress > "" Then
  
  'btnLinked.show() 'this gives error "btnLinked.show is not a function"
  btnLinked.hidden = False 'this works
  'btnNotLinked.hide() this gives error "btnNotLinked.hide is not a function"
  btnNotLinked.hidden = True
  
End If
'End Function
'End Function

Tip : If you’re pasting code, html or config files, surround the code with triple back ticks (```), before the first line and after the last one. It will be formatted properly. (We fixed it for you this time)

In the Console while your app is running, type

btnLinked

btnNotLinked

Do they both have values?

If you mean the ‘start in desktop browser’ console, this is what I get

Re reading your question: why not use btnLinked.hidden = False?

.show() worked flawlessly for over a year, then started giving the error message.
So I have to wonder what changed to make it an error now.
I can live with the fact that the answer to that may be unknown and go ahead and use .hidden=false.
When i do though, on closing then reoppening the app, the button is hidden again.
the .show() made it remain showing even after closing and reopening.

It could be a timing problem. It’s possible that you are trying to call the .show() function before the control is completely instantiated.

You can test this by entering btnLinked.show() into the console once the app is loaded.

It’s quite possible that additional code or controls added to your project resulted in it taking longer to load them - so other code you are running gets executed before it is complete.

Can you give a quick ‘how to’, or direct me to a tutorial on the console test you mentioned above?

I am not familiar with how to use the console.

NVM, I just watched some videos on using the console.