Why do you want to use JScript? You can do it with rules. If you still want
to use code, a checkbox is a field just like any other field. You can use
XDocument.selectSingleNode to retrieve a field's value. Do a search in this
newsgroup on selectSingleNode; you should be able to find many samples.
---
S.Y.M. Wong-A-Ton
Hi, sorry to bother you.
I have to change the value of a checkbox via jscript. I tried this way but
it is not working:
pagebr3 =
XDocument.DOM.selectSingleNode("my:myFields/my:Definire_Certificat_Urbanism/my:pagebreak3");
// if condition true => checkox.value=true
if ("...."){
pagebr3.text = 1;
}
> Why do you want to use JScript? You can do it with rules. If you still want
> to use code, a checkbox is a field just like any other field. You can use
[quoted text clipped - 13 lines]
> > Thanks,
> > -Joe
S.Y.M. Wong-A-Ton - 14 Mar 2008 08:20 GMT
Double-check via the properties dialog box for the checkbox what the value
when cleared and checked should be (1/0 or TRUE/FALSE). If it is 1/0,
double-check whether you've got the right node (XPath expression). Tip: In
InfoPath, right-click on the checkbox, and change it into a textbox. Try
setting the value through code. Once you've got that working, change it back
to a checkbox.
---
S.Y.M. Wong-A-Ton
> Hi, sorry to bother you.
> I have to change the value of a checkbox via jscript. I tried this way but
[quoted text clipped - 23 lines]
> > > Thanks,
> > > -Joe
Cristina - 14 Mar 2008 08:47 GMT
Thanks. It worked!
> Double-check via the properties dialog box for the checkbox what the value
> when cleared and checked should be (1/0 or TRUE/FALSE). If it is 1/0,
[quoted text clipped - 32 lines]
> > > > Thanks,
> > > > -Joe