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.
Created a jscript function to manipulate date fields (to call from an OnAfterChange event). Very simple at this point. Problems:
1. This statement doesn't seem to correctly reference the weekDay field:
var weekDay1 = XDocument.DOM.selectSingleNode("//my:day1/my:weekDay");
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") ?
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:
var weekStart = XDocument.DOM.selectSingleNode("//my:weekStartDate");
var date3 = XDocument.DOM.selectSingleNode("//my:date3");
date3.text = weekStart
Any help will be appreciated.
mg