I am able to retrieve values out of my forms from the task pane in InfoPath 2003. However, I am having difficulty getting it to work in 2007. I get the error "Reference to undeclared namespace prefix: 'my'."
Here is the code I am attempting to use:
// Get a reference to the XDocument object for the InfoPath Form.
XDocument = window.external.Window.XDocument;
var bb = XDocument.DOM.selectSingleNode("/my:myFields/my:field1").value;