Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

Need help with javascript/Jqyery to Capture the text/value of the selected checkbox in HTML.


venkatesh emandi

Recommended Posts

I added a button then clicked on the “lightning bolt” icon

and clicked the … icon to create an onClick event and JavaScript function.

image.png.98b0eef7be7284aa2a11efaa2cbe0ad3.png 

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:

image.thumb.png.63013303ad9cc862587383c2d26d99d2.png When run, it looks like this:

image.thumb.png.77eba7b9ef312c009813dca533e3f7dd.png 

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.image.thumb.png.a09cff139f54b34206ec8ea98834d526.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...