Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / October 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
scott.briscoe@comcast.net - 05 Oct 2007 14:02 GMT
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;
Shiva (GGK Tech) - 06 Oct 2007 10:39 GMT
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 -
Shiva (GGK Tech) - 06 Oct 2007 12:39 GMT
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;
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.