- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 03:02 AM
Hi Experts
I want to create a checkbox in ui page
I have added this checkbox code in the HTML Tag
<g:ui_checkbox name="changeBox" value="${false}"/>
<label>Check Box</label>
now I want to capture this value in the client script of the UI Page.
if check box is true then do that if false then this.
how can I do that?
Thanks
Elias
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 03:14 AM
Hi Elias,
You can check out some of the out of the box UI Pages which uses checkbox.
I just checked this ui page named "activate_plugin_confirm".
In this servicenow has given a unique id to the checkbox field. This id can then be used in the processing script directly.
To know more you can open the code for this ui page.
Or you can use something like
<input type="checkbox" name="somename" id="someid" title="sometitle" value="somevalue" onclick="openClicked(this);" />
Then define a function in your UI Page client script section like this
function openClicked(cb)
{
alert(cb.checked);//this will show a popup if the checkbox is checked or not.
}
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 03:14 AM
Hi Elias,
You can check out some of the out of the box UI Pages which uses checkbox.
I just checked this ui page named "activate_plugin_confirm".
In this servicenow has given a unique id to the checkbox field. This id can then be used in the processing script directly.
To know more you can open the code for this ui page.
Or you can use something like
<input type="checkbox" name="somename" id="someid" title="sometitle" value="somevalue" onclick="openClicked(this);" />
Then define a function in your UI Page client script section like this
function openClicked(cb)
{
alert(cb.checked);//this will show a popup if the checkbox is checked or not.
}
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 03:42 AM
Hi Mahira
this is exaclty what I was searching for..
Many thanks
Elias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2021 09:11 PM
Hello,
Can someone please help? I have been searching on the web for many days, but I have no luck of finding an example of the below request.
I need a button on the incident form. When a user click on the button, a popup window with 4 checkboxes and a OK and Cancel buttons. If a user select one or all checkboxes, then click on the OK button. The select checkboxes information will populated in either the comment or work notes field on an incident form. If a user click on a cancel button, then it will close the popup window.
Thank you in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2024 04:42 AM
Did you find a solution to your problem?