How get the value of a field with javascript?

Hi, i have a CONTROL APP with a field type checkbox (Values Y and N), i created a button type javascript i need in this button to assign to a variable the value of the field.
I am doing it this way:

var v_acepta = $(‘sc_dan_acpto’).value;

But I getting the value: UNDEFINED

How can i get the value?

if it is a control applicacion you only need to set the variable to the field and thats it

var v_acepta = {sc_dan_acpto};

afaik

Hi, kafecadm, i tried that way but it does not work. The field name really is DAN_ACPTO, but i think SC put a suffix sc_
Any other idea?. Thanks you.

i am testing the same of examples SC, but it does not work.

if(document.F1.dan_acpto[0].checked){
alert(“job hour above the allowed.”);
}

Which is the way Correct?

Then your code should be without the SC_ prefix.

I tried this way but do not worked. In the SC help does not need prefix.

Hi. Giu, thanks you, it worked fine. My line final was: $(".sc-ui-checkbox-dan_acpto")[0].checked.
I does not undestand why the manual of SC say other things diffents about javascript and i wasted much time trying volve it.
The manual say: document.F1.sex[0].checked But it does not Work!!.

Thanks you Gui for help me.