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