<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18876"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=387383911-08042010><FONT color=#0000ff
size=2 face=Arial>Well I've switched from one 3rd party lib to another 3rd party
lib with the same error:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=387383911-08042010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=387383911-08042010><FONT color=#0000ff
size=2 face=Arial>12:33:27:289 EROR OPEN_VXI scaraman callid=[8005]
|139901345446224|8005|SEVERE|swi:SBjsi|501|SBjsi: ECMAScript engine
exception|errmsg=TypeError: function $ does not always return a
value|line=139899969732909|linetxt=function $(c,t){t=c[m];delete
c[m];try{e(c)}catch(z){c[m]=t;return 1}};|tokentxt=};<BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=387383911-08042010><FONT color=#0000ff
size=2 face=Arial>...Where '$' was 'str' in the first
library.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=387383911-08042010><FONT color=#0000ff
size=2 face=Arial> </DIV></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=387383911-08042010><FONT color=#0000ff
size=2 face=Arial>Something, somewhere, is not happy. I'm now concerned as to
just what I can and cannot expect from using Javascript within voicexml using
voiceglue.</FONT></SPAN></DIV>
<DIV><SPAN class=387383911-08042010><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=387383911-08042010><FONT color=#0000ff size=2 face=Arial>All I
want to do is record a history of key=value pairs and submit them at the end as
a list parsable within PHP. I hoped JSON might provide an easy
path.</FONT></SPAN></DIV>
<DIV><SPAN class=387383911-08042010><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><BR></DIV>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> voiceglue-bounces@voiceglue.org
[mailto:voiceglue-bounces@voiceglue.org] <B>On Behalf Of </B>James
Green<BR><B>Sent:</B> 08 April 2010 11:54<BR><B>To:</B> General discussion about
voiceglue<BR><B>Subject:</B> [Voiceglue] Spidermonkey
issue..?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2
face=Arial>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2 face=Arial>Apparently Voiceglue
uses Spidermonkey to provide JavaScript. In our case we have 1.8.1
[1] which provides a JSON.stringify() method [2].</FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2 face=Arial>Using this within
voiceglue doesn't appear to work however:</FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2 face=Arial>11:40:58:191 EROR
OPEN_VXI scaraman callid=[7995]
|139901345446224|7995|SEVERE|swi:SBjsi|501|SBjsi: ECMAScript engine
exception|errmsg=ReferenceError: JSON is not
defined|line=139899969732609|linetxt=|tokentxt=<BR></FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2 face=Arial>Snippet from the
script:</FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2 face=Arial><script>var
packet =
JSON.stringify(document.actions);</script><BR></FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2 face=Arial>I was rather hoping
not to have to import a 3rd party script, so if I'm doing something wrong could
someone kindly point out the problem?</FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2
face=Arial>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2
face=Arial>James</FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2 face=Arial>[1] $ dpkg -l | grep
libmoz</FONT></SPAN></DIV>
<DIV><SPAN class=549594710-08042010><FONT size=2 face=Arial>ii
libmozjs-dev
1.8.1.16+nobinonly-0ubuntu1 Development
files for the Mozilla SpiderMonk<BR>ii
libmozjs0d
1.8.1.16+nobinonly-0ubuntu1 The Mozilla
SpiderMonkey JavaScript library<BR></FONT></SPAN><SPAN
class=549594710-08042010><FONT size=2 face=Arial>[2] <A
href="https://developer.mozilla.org/en/Using_native_JSON">https://developer.mozilla.org/en/Using_native_JSON</A></DIV></FONT></SPAN>
<P><FONT size=2 face=Arial>No virus found in this incoming message.<BR>Checked
by AVG - www.avg.com<BR>Version: 9.0.801 / Virus Database: 271.1.1/2797 -
Release Date: 04/08/10 07:32:00<BR></FONT></P>
<P><FONT size=2 face=Arial></FONT></P></BODY></HTML>