Add ID to Button
Daniel Mulroy last edited by Daniel Mulroy
I think I completely understand what you're trying to do, and I'm not sure it's possible.
HOWEVER - there's a better way to accomplish it besides adding the ID directly to the button.
Change any instance of getElementById
This selects first the container element that has the "updateButton" id, then selects the first button element contained therein.
That's how I would do it with PageBuilder
@Daniel-Mulroy Great tip! I'm going to try this out tonight. One more question: what would the equivalent code for the input field within the cloud backend input be?
Thanks again and enjoy the rest of your day!
Exactly. You can check the link to w3 schools in my previous post for all the different combinations of selectors use can use, it's very very useful!
Also, I recommend you add a feature request in the forum for binding keystrokes to buttons via PageBuilder interface. That's a great use case!
@Daniel-Mulroy can you please (re-)send the lint to w3schools with the different combinations of selectors? Thanks in advance!
@Daniel-Mulroy are you sure this selector combination is valid?
I've tried, but I keep getting this error:
Thanks again for your help! I really appreciate it and hope I repay your kindness some day.
Wassim last edited by
@Dick-Honing maybe send a screenshot to your HTML to see if there is a "button" type element inside an element with the id "updateButton"
Based on that HTML, you don't have an actual html "button" element... you have a span element with a click() action and a rectangular background
The valid selector combination to select the first span inside your "message" div would be:
@Daniel-Mulroy thanks again for your help! Really appreciated!