Subj : Is JS_EvaluateScript with right context and object? To : netscape.public.mozilla.jseng From : ismy_br Date : Tue Oct 05 2004 03:52 pm Hi Everyone, Iīve created my own class in Mozilla 1.7.3 SpiderMonkey. It works fine, I can call my function classes, under Mozilla browser. I have a question: Can I call the javascript code that is in the HTML page from SpiderMonkey code? PS: I have to make a thread to call this javascript function. Iīve tried: =========================================================== /*The same runtime from Mozilla*/ cx_global = JS_NewContext(cx->runtime, 8192); thread { JS_SetContextThread(cx_new); strcpy(script, "javascript_function_teste(1, \"teste\")"); JS_EvaluateScript(cx_new, JS_GetGlobalObject(cx_new), script, strlen(script), "", 0, &rval); JS_ClearContextThread(cx_new); } =========================================================== When I run this, I canīt see anything at Mozilla browser. It appears that isnīt executing my javascript. What is the correct way to execute the javascript code from Mozilla HTML page? Regards, Jacknill .