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)
.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.