- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 10:41 PM
Hi All,
I have configured a ui page with 2 check box. Below is the code.
<g:ui_checkbox name="resolution time" id="check1" onclick="addvalue();"/>Check1
<g:ui_checkbox name="difficulties" id="check2" onclick="addvalue2();"/>Check2
Now i need to have these checkbox values in client script. Below is the code.
function addvalue()
{
var ch1 = document.getElementById("check1").checked;
alert("Check1 is: "+ch1);
}
In the alert i am getting "UNDEFINED".
How to get the value. Please help me on this.
Thanks,
Maddy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2017 04:23 AM
Hi All,
Below peice of code worked for me.
<g:ui_checkbox name="resolution time"/>Check1
<g:ui_checkbox name="difficulties"/>Check2
Now i need to have these checkbox values in client script. Below is the code.
function addvalue()
{
var ch1 = document.getElementById("resolution_time").value;
alert("Check1 is: "+ch1);
}
Thanks for all your support.
Thanks,
Maddy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 10:55 PM
Hi,
On client script you can get value of checkboxes as:-
var ch1 = document.getElementById("ni.resolution_time").checked;
var ch2 = document.getElementById("ni.difficulties").checked;
alert(ch1+','+ch2);
Try it, if it works,
Thanks,
Apurva Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 10:56 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 11:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2017 04:23 AM
Hi All,
Below peice of code worked for me.
<g:ui_checkbox name="resolution time"/>Check1
<g:ui_checkbox name="difficulties"/>Check2
Now i need to have these checkbox values in client script. Below is the code.
function addvalue()
{
var ch1 = document.getElementById("resolution_time").value;
alert("Check1 is: "+ch1);
}
Thanks for all your support.
Thanks,
Maddy