Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get colon separated values in Javascript from Check Box

615441Jul 8 2009 — edited Jul 9 2009
Hi,

I want to get values of a Check Box item as a colon separted form as what we get in Database. For example "10:11:12".

When I tried to write a code like this it doesn't work. Please tell me where I am going wrong.


function getValues(pcheckbox) {
cb_name = html_GetElement(pcheckbox+'_0').name;
cb_array = document.getElementByName(cb_name);
var val_str =':';
for (i=0; i<cb_array.length; i++ )
{
if (cb_array.checked)
{
val_str += cb_array[i].value + ':';
}
}
html_GetElement(P206_TEXT).value = val_str;
}



I am trying to call the function by getValues('P206_CHECK');

Thanks & Regards,
Vikas Krishna
This post has been answered by pjturley on Jul 8 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2009
Added on Jul 8 2009
4 comments
622 views