Subj : question with JS_EvaluateScript To : netscape.public.mozilla.jseng From : "lyg" Date : Sat Mar 13 2004 12:02 pm I have a question when executing script code in my app. For example, when the script code is "myfunc1();var k = 7; myfunc2(k); ", I can use the JS_EvaluateScript(.......), but when "return" is included in the code , how to execute it? for example: "return myFun();" I use a inconvenient solution , that is to JS_EvaluateScript(cx, obj, "function tempfun{ return myFun} tempfun;", strlen(..), 0, 0, rval); In this way, throught the rval, i can how the return value of "return myFun". It must have a better solution. I just want to know the return value of script code; .