Change bootstrap checkbox to true at runtime

I guess it’s quite simple, but…

why can’t I set a bootstrap checkbox to true at runtime?

i’ve tried
Checkbox1.setValue(1,True)
and
Checkbox1.setValue(1) = True

but at least attempt 1 says:
Uncaught TypeError: Checkbox1.setValue is not a function.
line 2 column 11

@suseday

Just Checkbox1.setValue(0);
or Checkbox1.setValue(1); ?

Bernd

nope. that doesn’t work. try the sample with that code…

I added a button to the bootstrap/checkbox sample and the code looks like that:

Function Button1_onclick()
Checkbox1.setValue(0,True)
End Function

If you have only one checkbox its number is 0

thank you guys for taking time. Yes, that works. But I am quite sure that I testet that also! I am confused… But now I can’t say why it didn’t work before. It might be that I put that code not in a function. I tried and the code works only inside a function.

anyway. Thanks alot!

Btw. the wiki should be edited. I’ll try to get an account to edit.

I tried it with the sample and it did work. I made checkbox1 unchecked by Checkbox1.setValue(0);

Bernd