yes, I forgot the single quota in javascript statement. Now I saw the aruments. Thanks,<br><br><div><span class="gmail_quote">On 10/28/09, <b class="gmail_sendername">Eliot Gable</b> <<a href="mailto:egable%2Bfreeswitch@gmail.com">egable+freeswitch@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Should work fine. I use this:<br> <br> var calling_num = argv[0];<br> var called_num = argv[1];<br> <br> Are you sure you actually had valid data in $1 and $2? Try to call it<br> from the CLI:<br> <br> jsrun test.js testvar1 testvar2<br>
<br><br> <br> <br> On Wed, Oct 28, 2009 at 10:22 PM, Erwin Davis <<a href="mailto:davis.erwin@gmail.com">davis.erwin@gmail.com</a>> wrote:<br> > Hi, new to javascript. I tried to pass two arguments into javascript,<br>
><br> > <action application="javascript" data="test.js $1 $2"/><br> ><br> ><br> > In test.js, I tried to use argv[1] to retrieve $1 and argv[2] to retrieve<br> > $2, however, the javascript test.js complained about argv[] as undefined<br>
> variables. How to retrieve the passing arguments in a javascript same as the<br> > case above. Thanks,<br> ><br> <br>> _______________________________________________<br> > FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> > <a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
><br> ><br> <br> <br> <br> --<br> Eliot Gable<br> <br> "We do not inherit the Earth from our ancestors: we borrow it from our<br> children." ~David Brower<br> <br> "I decided the words were too conservative for me. We're not borrowing<br>
from our children, we're stealing from them--and it's not even<br> considered to be a crime." ~David Brower<br> <br> "Esse oportet ut vivas, non vivere ut edas." (Thou shouldst eat to<br> live; not live to eat.) ~Marcus Tullius Cicero<br>
<br> _______________________________________________<br> FreeSWITCH-users mailing list<br> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> <a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
</blockquote></div><br>