I am working on an HTML widget will display the categories and associated tags from the selected place as checkboxes, so they can be selected and used to trigger a filtered search or other actions. It's all working except for when I try to have an accordion effect when clicking on the Category name to show or hide the associated tags.
In fact, it works fine up to the point where the Categories and tags load, with the Categories "collapsed". When I click on a Category name, the list of tags toggles to "show" and is visible for about 1 second, at which time the "Widget content currently unavailable" error appears. Actually, it shows up in the widget twice.
Is there a generic cause for this error message that I can look for in my code so that I can write around it to make the widget work? If not, I can share more details of my code to help troubleshoot it.
I'm sure there are more cases in which this might occur, but in this specific case it is because I was using an <input type="submit"> instead of type="button". Change it to a button and it works. h/t and huge thanks to Steven Kichak for the save.