In InfoPath 2007 - How do I retrieve a value from a form via the task pane using a standard html page and javascript? - InfoPath Dev
in

InfoPath Dev

In InfoPath 2007 - How do I retrieve a value from a form via the task pane using a standard html page and javascript?

Last post 10-10-2007 07:06 AM by ur1down. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-02-2007 07:03 AM

    In InfoPath 2007 - How do I retrieve a value from a form via the task pane using a standard html page and javascript?

    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;

  • 10-10-2007 07:06 AM In reply to

    Re: In InfoPath 2007 - How do I retrieve a value from a form via the task pane using a standard html page and javascript?

    Thanks to another online expert I was able to get the answer.

    XDocument = window.external.Window.XDocument;

    XDocument.DOM.setProperty('SelectionNamespaces', 'xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-09-27T16:18:33"' ); //The namespace for "my" path can be found in the myschema.xsd file.

    var bb = XDocument.DOM.selectSingleNode("/my:myFields/my:field1").value;

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.