- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2015 04:26 PM
Hey all
I have a catalogue form with a large list of checkboxes.
I'd like to know how to detect which checkbox has been clicked by a requestor so I can apply a style to differentiate it from the checkboxes that are auto-filled.
I've no idea where to start.
Anyone got any ideas?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2015 11:36 PM
Hi Bryce, you were right! Here goes the fix. Add the following at the beginning of your inline defined onclick function (@ line 12)
gel('IO:' + item.sys_id).value = this.checked;if (typeof(variableOnChange) == 'function') variableOnChange('IO:' + item.sys_id);
I'll appreciate if you can mark this post as the correct one or as a helpful one so that others reading this post in the future know that this line is *key* to be added in the inline defined onclick function.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2015 10:44 PM
Hi Bryce, when you say filter down are you referring that none of the checked check boxes are getting copied over as checked to the RITM?
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2015 10:48 PM
Sorry Berny, yes that is what I mean.
The boxes that were checked do not appear checked in the ritm after clicking order now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2015 11:36 PM
Hi Bryce, you were right! Here goes the fix. Add the following at the beginning of your inline defined onclick function (@ line 12)
gel('IO:' + item.sys_id).value = this.checked;if (typeof(variableOnChange) == 'function') variableOnChange('IO:' + item.sys_id);
I'll appreciate if you can mark this post as the correct one or as a helpful one so that others reading this post in the future know that this line is *key* to be added in the inline defined onclick function.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2015 03:25 PM
Hi Berny,
I've added that line on line 12 and it has stopped the entire client script to stop working.
I've tried moving it around to other sections in the code and still can't seem to get it working.
Any ideas?
Sorry for all the questions!
EDIT: Actually I have worked it out! Ended up changing the item.sys_id code to the item_sysid function.
Unfortunately it still doesn't carry across to the RITM after hitting submit.
If I disable the client script handling all this, it does go through properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2015 06:31 AM
Hi Bryce, here goes the code that I'm using. It works ok in a Fuji instance. I can see the checkbox selected in the RITM
function onLoad() {
gel('ni.IO:dba29ae84fc20200fbb73fb28110c721').onclick = function() {
gel('IO:dba29ae84fc20200fbb73fb28110c721').value = this.checked;
if (typeof(variableOnChange) == 'function') variableOnChange('IO:dba29ae84fc20200fbb73fb28110c721');
alert('This is checked: ' + this.checked + ' and its value is ' + this.value);
};
}