<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Validation Script Issue; Can you help?</title><link>https://www.infopathdev.com:443/forums/thread/11055.aspx</link><pubDate>Wed, 07 Feb 2007 00:12:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11055</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11055.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11055</wfw:commentRss><description>Hi tch_hp,&lt;br /&gt;&lt;br /&gt;I'm not going to be able to do full debugging for you, but you might try spitting out something like  "XDocument.DOM.documentElement.xml" into a XDocument.UI.Alert();</description></item><item><title>Re: Validation Script Issue; Can you help?</title><link>https://www.infopathdev.com:443/forums/thread/11054.aspx</link><pubDate>Tue, 06 Feb 2007 18:55:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11054</guid><dc:creator>tch_hp</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11054.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11054</wfw:commentRss><description>I don't see why it won't work.  Here is the complete script code:&lt;br /&gt;&lt;br /&gt;&lt;font color="blue"&gt;/*&lt;br /&gt; * This file contains functions for data validation and form-level events.&lt;br /&gt; * Because the functions are referenced in the form definition (.xsf) file, &lt;br /&gt; * it is recommended that you do not modify the name of the function,&lt;br /&gt; * or the name and number of arguments.&lt;br /&gt; *&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// The following line is created by Microsoft Office InfoPath to define the prefixes&lt;br /&gt;// for all the known namespaces in the main XML data file.&lt;br /&gt;// Any modification to the form files made outside of InfoPath&lt;br /&gt;// will not be automatically updated.&lt;br /&gt;//&amp;lt;namespacesDefinition&amp;gt;&lt;br /&gt;XDocument.DOM.setProperty("SelectionNamespaces", 'xmlns:xs="http://www.w3.org/2001/XMLSchema"');&lt;br /&gt;//&amp;lt;/namespacesDefinition&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;// This function is associated with the following field or group (XPath): /Track_Changes/Overview&lt;br /&gt;// Note: Information in this comment is not updated after the function handler is created.&lt;br /&gt;//=======&lt;br /&gt;function msoxd__Overview::OnAfterChange(eventObj)&lt;br /&gt;{&lt;br /&gt;	var xmlOverviewUpdate = XDocument.DOM.documentElement.selectSingleNode("/xs:Overview/xs:OverviewUpdate");&lt;br /&gt;	xmlOverviewUpdate.value = "true";&lt;br /&gt;&lt;br /&gt;// Write code here to restore the global state.&lt;br /&gt;&lt;br /&gt;	if (eventObj.IsUndoRedo)&lt;br /&gt;		{&lt;br /&gt;			// An undo or redo operation has occurred and the DOM is read-only.&lt;br /&gt;			return;&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;// A field change has occurred and the DOM is writable. Write code here to respond to the changes.&lt;br /&gt;&lt;br /&gt;}&lt;/font id="blue"&gt;&lt;br /&gt;&lt;br /&gt;And here is the complete schema code:&lt;br /&gt;&lt;br /&gt;&lt;font color="blue"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!-- edited with XMLSpy v2006 sp2 U &lt;a target="_blank" href=http://www.altova.com&gt;http://www.altova.com&lt;/a&gt;) by Tim Hansen (HP) --&amp;gt;&lt;br /&gt;&amp;lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"&amp;gt;&lt;br /&gt;	&amp;lt;xs:element name="Track_Changes"&amp;gt;&lt;br /&gt;		&amp;lt;xs:annotation&amp;gt;&lt;br /&gt;			&amp;lt;xs:documentation&amp;gt;Comment describing your root element&amp;lt;/xs:documentation&amp;gt;&lt;br /&gt;		&amp;lt;/xs:annotation&amp;gt;&lt;br /&gt;		&amp;lt;xs:complexType&amp;gt;&lt;br /&gt;			&amp;lt;xs:sequence&amp;gt;&lt;br /&gt;				&amp;lt;xs:element name="Overview"&amp;gt;&lt;br /&gt;					&amp;lt;xs:complexType&amp;gt;&lt;br /&gt;						&amp;lt;xs:simpleContent&amp;gt;&lt;br /&gt;							&amp;lt;xs:extension base="xs:string"&amp;gt;&lt;br /&gt;								&amp;lt;xs:attribute name="OverviewUpdate" type="xs:boolean" use="optional" default="false"/&amp;gt;&lt;br /&gt;							&amp;lt;/xs:extension&amp;gt;&lt;br /&gt;						&amp;lt;/xs:simpleContent&amp;gt;&lt;br /&gt;					&amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;				&amp;lt;/xs:element&amp;gt;&lt;br /&gt;			&amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;		&amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;	&amp;lt;/xs:element&amp;gt;&lt;br /&gt;&amp;lt;/xs:schema&amp;gt;&lt;/font id="blue"&gt;</description></item><item><title>Re: Validation Script Issue; Can you help?</title><link>https://www.infopathdev.com:443/forums/thread/11053.aspx</link><pubDate>Tue, 06 Feb 2007 18:36:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11053</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11053.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11053</wfw:commentRss><description>Something is wrong with the XPath. You should double-check that it's correct and then see if you're hitting a namespace issue.&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://infopathdev.com/howto/tutorials/default.aspx?i=ed2cf0c5895f468995cdd081cf17fead&gt;http://infopathdev.com/howto/tutorials/default.aspx?i=ed2cf0c5895f468995cdd081cf17fead&lt;/a&gt;</description></item><item><title>Re: Validation Script Issue; Can you help?</title><link>https://www.infopathdev.com:443/forums/thread/11052.aspx</link><pubDate>Tue, 06 Feb 2007 18:28:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11052</guid><dc:creator>tch_hp</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11052.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11052</wfw:commentRss><description>Ok, here's the code I used:&lt;br /&gt;&lt;br /&gt;XDocument.DOM.selectSingleNode("/xs:Overview/xs:OverviewUpdate").text="true";&lt;br /&gt;&lt;br /&gt;but I get a runtime error -&lt;br /&gt;&lt;br /&gt;"'XDocument.DOM.selectSingleNode(...)' is null or not an object"&lt;br /&gt;&lt;br /&gt;????</description></item><item><title>Re: Validation Script Issue; Can you help?</title><link>https://www.infopathdev.com:443/forums/thread/11051.aspx</link><pubDate>Tue, 06 Feb 2007 17:54:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11051</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11051.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11051</wfw:commentRss><description>Hi tch_hp and welcome to the forums!&lt;br /&gt;&lt;br /&gt;This should be pretty trivial, try this statement:&lt;br /&gt;&lt;br /&gt;thisXDocument.DOM.selectSingleNode( "/my:myFields/my:OverviewUpdate" ).text = "true";&lt;br /&gt;&lt;br /&gt;You'll have to update the XPath to match your schema exactly, but this should do the trick.</description></item><item><title>Validation Script Issue; Can you help?</title><link>https://www.infopathdev.com:443/forums/thread/6047.aspx</link><pubDate>Tue, 06 Feb 2007 17:21:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6047</guid><dc:creator>tch_hp</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6047.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6047</wfw:commentRss><description>I am trying to write a script in the OnAfterChange event for a text box that will change the value of a boolean atribute to true; that attribute is linked to a checkbox on the form. The schema string element for the text box is called "Overview" and the boolean attribute on that element is called "OverviewUpdate".  Any ideas?</description></item></channel></rss>