Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / March 2008

Tip: Looking for answers? Try searching our database.

Getting Check Box Values via Jscript

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rigsjc@gmail.com - 11 Jan 2008 14:41 GMT
Hello,

Please help an InfoPath 2003 newbie...  I have a group of check boxes
on a form that I need to determine which boxes have been checked
(selected).  Can someone provide me a Jscript example of how I would
determine that?  Please help.

Thanks,
-Joe
S.Y.M. Wong-A-Ton - 15 Jan 2008 05:16 GMT
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


> Hello,
>
[quoted text clipped - 5 lines]
> Thanks,
> -Joe
Cristina - 13 Mar 2008 13:47 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.