
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2021 04:09 AM
How to get checkbox value from html to client side in widget- Service Portal
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2021 10:32 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2021 04:22 AM
Hi Ajay,
Try
var checkBox = document.getElementById("enableButton").value
alert(checkBox);
Mark Correct & Helpful, if applicable.
Thanks,
Sandeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2021 09:42 AM
Hi Ajay Sharma,
Please refer Below code Example for getting check box value from HTML into the client Script.
HTML Code
<h1>Passig Values from HTML to CLient script</h1>
<input type="checkbox" id="myCheck1" value="Yes, I'm a web developer">
<button type="submit" ng-click="c.submit()" >Check</button>
Client Script
api.controller=function() {
/* widget controller */
var c = this;
c.submit=function () {
var yes = document.getElementById("myCheck1");
alert("hi Value is :"+yes.checked);
}
Please find Below Screenshots for your reference:
If it is helpful, Please mark helpful/correct.
Thanks.
Warm Regards,
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2021 10:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2021 03:00 AM