<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Two Jscript Problems: Can't Find Solution</title><link>https://www.infopathdev.com:443/forums/thread/13168.aspx</link><pubDate>Fri, 11 Mar 2005 01:32:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13168</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13168.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13168</wfw:commentRss><description>Hi MG!&lt;br /&gt;Welcome to the board. For examples of how to use dates with jscript open up any one of the 25 Samples that ship with InfoPath in the designer and extract the form files. Look at the script.js files. Should have lots of good info in there for you.&lt;br /&gt;Patrick</description></item><item><title>Two Jscript Problems: Can't Find Solution</title><link>https://www.infopathdev.com:443/forums/thread/12432.aspx</link><pubDate>Thu, 10 Mar 2005 14:16:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12432</guid><dc:creator>darcanion</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12432.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12432</wfw:commentRss><description>I'm an InfoPath newbie hoping the following syntax problems might be easy for some of you to fix. I've searched in Help, online resources, and even purchased "Beginning InfoPath 2003" and still can't find a solution.&lt;br /&gt;&lt;br /&gt;Created a jscript function to manipulate date fields (to call from an OnAfterChange event). Very simple at this point. Problems:&lt;br /&gt;&lt;br /&gt;1. This statement doesn't seem to correctly reference the weekDay field: &lt;br /&gt;   	var weekDay1 = XDocument.DOM.selectSingleNode("//my:day1/my:weekDay");&lt;br /&gt;The cell bound to weekDay1 remains blank even with something simple like weekDay1 = "test". The field is inside a Group called "day1" that seems to be properly bound to the cell.  If I try weekDay1.text = "test" I get a "null or not an object error". Is the problem here: ("//my:day1/my:weekDay") ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. I get a "type mismatch" error when I try to set one field to the value of another--even though I tried setting both to date or both to text:&lt;br /&gt;	var weekStart = XDocument.DOM.selectSingleNode("//my:weekStartDate");&lt;br /&gt;	var date3 = XDocument.DOM.selectSingleNode("//my:date3");&lt;br /&gt; 	date3.text = weekStart&lt;br /&gt;&lt;br /&gt;Any help will be appreciated.&lt;br /&gt;&lt;br /&gt;mg</description></item></channel></rss>