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 / August 2005

Tip: Looking for answers? Try searching our database.

Using nodeName property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anton L - 08 Aug 2005 20:33 GMT
Reading about numerous people raving about the performance increase when the
number of node handlers decereases, I've atteptmed to put one even handler on
a "group" of nodes rather than each node.

I have the following structure
myFields
 group1
   test1
   test2

So with onAfterChange attached to group1, the following code cannot determine
the name of the node where the event was fired

eventObj.Source.nodeName

instead it returns #text.

Any ideas on how to avoid this?
Thanks in advance.
Scott L. Heim [MSFT] - 08 Aug 2005 21:56 GMT
Hi,

See if this works as you need in the OnAfterChange event:

           Select Case e.Parent.nodeName
               Case "my:test1"
                   thisXDocument.UI.Alert("Test 1")
               Case "my:test2"
                   thisXDocument.UI.Alert("Test 2")
           End Select

** NOTE: Just so we are on the same page, this sample is for use with
VB.NET.

Let me know if this works for you! :-)

Best Regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
Anton L - 08 Aug 2005 23:22 GMT
Attaching this code in its C# or JS version to the group1 node (made as Group
in infoPath data source) achieves nothing unfortunately.

>Hi,
>
[quoted text clipped - 18 lines]
>
>This posting is provided "AS IS" with no warranties, and confers no rights
Scott L. Heim [MSFT] - 09 Aug 2005 14:02 GMT
Hi,

Can you be a bit more specific? Are you saying the correct message boxes do
not appear, they do not appear whatsoever or modifying the code as I
described does not help the situation?

If the modified code does not help in your situation, can you describe what
you are trying to accomplish versus the results you see with the modified
code?

Your initial post was how to determine the node that fired - the sample
code should have resolved that question.

Thanks,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
 
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.