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;
Hi,
Here is “my” is name space prefix of your form. WE have to set the property
before getting the node value
You use the below code to set the property
XDocument.DOM.setProperty "SelectionNamespaces",
"xmlns:my=""http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-09-05T10:16:16"""
Hope this helps you

Signature
Shiva
http://www.ggktech.com
> 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
[quoted text clipped - 10 lines]
> var bb = XDocument.DOM.selectSingleNode("/my:myFields/
> my:field1").value;
scott.briscoe@comcast.net - 09 Oct 2007 13:28 GMT
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.
> Hi,
>
[quoted text clipped - 26 lines]
>
> - Show quoted text -
scott.briscoe@comcast.net - 09 Oct 2007 14:09 GMT
I found my answer in the myschema.xsd file and got it working. Thanks
again.
> Hi,
>
[quoted text clipped - 26 lines]
>
> - Show quoted text -

Signature
Shiva
http://www.ggktech.com
> 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
[quoted text clipped - 10 lines]
> var bb = XDocument.DOM.selectSingleNode("/my:myFields/
> my:field1").value;