venkatesh emandi Posted February 20, 2023 Share Posted February 20, 2023 Link to comment Share on other sites More sharing options...
David Beagan Posted February 20, 2023 Share Posted February 20, 2023 Your screen shot is from a page built with App Studio's HTML Canvas? Link to comment Share on other sites More sharing options...
venkatesh emandi Posted February 20, 2023 Author Share Posted February 20, 2023 Yes it was built in App Studio's HTML Canvas. Link to comment Share on other sites More sharing options...
Martin Yergeau Posted February 21, 2023 Share Posted February 21, 2023 IBI offers simple function to do it which can be placed under "Embedded JavaScript" tab of AppStudio HTML Canvas: var boxVal = IbComposer_getCurrentSelection('checkbox1'); Link to comment Share on other sites More sharing options...
David Beagan Posted February 23, 2023 Share Posted February 23, 2023 I added a button then clicked on the “lightning bolt” iconand clicked the … icon to create an onClick event and JavaScript function. Clicking the “Embedded JavaScript tab that is along the bottom of the canvas, reveals the JavaScript.I added this code to the newly created button1_onclick function:var cbox = document.getElementById('checkbox1');cbox.style.backgroundColor = "ivory";cbox.style.fontWeight = "bold";cbox.style.left = "10px"; const cbox5 = document.getElementById('checkbox1_LABEL_5');cbox5.style.color="red";It looks like this: When run, it looks like this: Clicking the Button runs the JavaScript to color the checkbox, bold all the values, change to a new postion and color the 5th value red. Link to comment Share on other sites More sharing options...
David Beagan Posted February 23, 2023 Share Posted February 23, 2023 Also, as in my example and Martin's the checkbox has a unique identifyer of checkbox1. Yours probably is too but not necessarily. To see for sure, select the checkbox and look at its properties. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now