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

Tip: Looking for answers? Try searching our database.

How to capture datevalue in repeatingsection through onSubmitReque

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
claudia - 23 May 2005 07:58 GMT
Hi all,
I want to capture the date value in repeating section thru jscript
functionality.  
For that I used the following code
This code is for non-repeatingcontrol
button:OnSubmitRequest(eventobj)
{
var datval="";
var orderdate=XDocument.DOM.selectSingleNode("//xpath)
datval=orderdate.text;
XDocument.UI.Alert(datval);
}

It is working fine:

In same way I want to capture the Date value in repeating section

for i used the following code

var orderdate=XDocument.DOM.selectNodes("//xpath");
for(i=0;i<=orderdate.length;i++)
{
   XDocument.UI.Alert(orderdate(i).text);
}

But it displays the following errror:

"Object Required"   here xpath is correct.  Could you please help on this

Signature

claudia

KjellSJ - 23 May 2005 12:41 GMT
correct your JScript array indexing:
orderdate[i].text

KjellSJ
http://kjellsj.blogspot.com

> Hi all,
> I want to capture the date value in repeating section thru jscript
[quoted text clipped - 24 lines]
>
> "Object Required"   here xpath is correct.  Could you please help on this
claudia - 23 May 2005 13:53 GMT
Thanks Kjells.

Now i have got the solution.  In my jscrip code I changed the forloop like
this .

var count=XDocument.DOM.selectNodes(//xpathforlineitem)
var counter=count.length;
for(i=0;i<=counter-1;i++)
{
  var orderdate=XDocument.DOM.selectNodes("//xpath");
  XDocument.UI.Alert(orderdate(i).text);
}
here counter is nothing but no of rows /lineitem in the repeating section.  
now it is working.

Thanks

Signature

claudia

> correct your JScript array indexing:
> orderdate[i].text
[quoted text clipped - 30 lines]
> >
> > "Object Required"   here xpath is correct.  Could you please help on this
 
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.