InfoPath 2007 - Retrieve a value from a form in task pane

S

scott.briscoe

I am using a standard HTML page and Javascript for my task pane. I am
able to retrieve values from my forms through 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;
 
S

scott.briscoe

Shiva, Thanks for the reply! I'm not sure if I completely follow.

1) How do I get the Namespace for my form? I assume each one is unique
2) Do you have a more complete example that you use?

Thanks again for lending your expertise.
 
S

scott.briscoe

I found my answer in the myschema.xsd file and got it working. Thanks
again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top