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 / November 2006

Tip: Looking for answers? Try searching our database.

problem with code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joel Allen - 08 Nov 2006 19:47 GMT
Hi,

I am having a problem with this code.  I'm just trying to retrieve the value
of one of my fields on line 33:

var JobName = XDocument.selectSingleNode("my:JobName").text;

The error I get is:

The following error occurred:

Object doesn't support this property or method
File:script.js
Line:33

Do you see a problem with this code right off the bat?

Thanks,
Joel
Russ - 09 Nov 2006 19:27 GMT
You need to use XDocument.DOM.selectSingleNode
The DOM is the xml tree itself, so that's where you have to go to get at
nodes.

> Hi,
>
[quoted text clipped - 15 lines]
> Thanks,
> Joel
Joel Allen - 10 Nov 2006 17:10 GMT
Thanks for your reply Russ.  I tried this and still got an error:

var JobName = XDocument.DOM.selectSingleNode("my:JobName").text;

The error says object required.

Thanks,
Joel

> You need to use XDocument.DOM.selectSingleNode
> The DOM is the xml tree itself, so that's where you have to go to get at
[quoted text clipped - 20 lines]
>> Thanks,
>> Joel
S.Y.M. Wong-A-Ton - 14 Nov 2006 00:06 GMT
The XPath expression to the "my:JobName" node is probably incorrect.
Double-check it and/or try using "//my:JobName" instead.
---
S.Y.M. Wong-A-Ton

> Thanks for your reply Russ.  I tried this and still got an error:
>
[quoted text clipped - 29 lines]
> >> Thanks,
> >> Joel
 
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.