How to capture datevalue in repeatingsection through onSubmitReque

C

claudia

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
 
C

claudia

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

--
claudia


KjellSJ said:
correct your JScript array indexing:
orderdate.text

KjellSJ
http://kjellsj.blogspot.com


claudia said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top