Page 1 of 1
The button widget is as I can nderstand missing the event on change
Posted: Thu May 27, 2021 10:42 am
by anders
Hi, I hope I have not missed something here, but in all widgets I have used so far have an event that say onchange, except in the button widget it seems to be missing the event onchange and only have onclick. I need onchange so right now I have to use the onclick and when publishing the code I have to open it in a texteditor to chene oll my onclick events to onchange events.
Is this something I have missunderstood or is this a bug. Please tell me how to solve this the texteditor workaround is risky to generate errors.
Best /Anders
Re: The button widget is as I can nderstand missing the event on change
Posted: Thu May 27, 2021 11:23 am
by Pablo
The 'onchange' event only makes sense if the value of the element can change, so it only works for input fields: editbox, textarea, combobox.
So, this is not a bug, the event is intentionally not displayed for the button.
Re: The button widget is as I can nderstand missing the event on change
Posted: Fri May 28, 2021 9:21 am
by anders
Thanks Pablo that makes sense, but I made a misstake in the question my problem was actually with a checkbox, the onchange event is also missing from the checkbox. Is this also intentional ?
Thanks for the fast reply.
/Anders
Re: The button widget is as I can nderstand missing the event on change
Posted: Fri May 28, 2021 9:26 am
by Pablo
A checkbox is basically a button, so it has the same events as the button object.
But I will investigate if the event can be added to a future update.
Re: The button widget is as I can nderstand missing the event on change
Posted: Fri May 28, 2021 1:28 pm
by anders
Thanks that would be helpful for my application. And in HTML the onchange event can be used for a checkbox, as I said what I do currently is use the event onclick and change it to onchange after I publish the project.
/Anders