Page 1 of 1

foreach not providing ECMA variable?

Posted: Mon Sep 24, 2007 12:45 pm
by moshe
I've got a nodeList I extract from a data element.

I'd like to print out the data elements, but when I attempt to do so, the foreach executes but the ECMAscript compiler complains:

Code: Select all

<foreach array="nodeList" item="foo">
 <log expr="':::::::LOG::::::::' + foo"/>
</foreach>
As far as I can tell, foreach ought to fail outright, or the items in nodeList ought to be printed in some for or another. What I get instead is

Code: Select all

VXI::foreach_element()
:::::::LOG::::::::
VXI::queue_prompts()
errmsg ReferenceError: foo is not defined line 1 linetxt tokentxt 

Posted: Mon Sep 24, 2007 1:18 pm
by moshe
After further debugging -- my system was actually complaining about a different foo -- I see that variables are possbily being created but are being ignored if so. toString() doesn't help.

IVR application script needed to better understand issue

Posted: Mon Sep 24, 2007 5:18 pm
by support
Hi,

Can you post the IVR application script that's causing this to happen? We need more information to help you with this IVR problem.

Regards,
Plum Support