Thank you very much :-))
For the moment, my c++ app modifies some nsiDomHtmlScript elements and tries
to execute these
new modified scripts by passing the scriptGlobalObject and context of the
domWindow (it doesn't work. Instead, javascript executes the old script
one).
So i wonder if can create a new script or a new function for my new script,
execute it, and then retrieve some
values. For example, say we have the following new script:
" Function titi() {
var i = 1;
var j = 2;
return i+j;
}"
how executing this new script and inspect the value of i, j, and 'i+j' in a
c++ app??
Thanks.
--
B�atrice Philippe
[EMAIL PROTECTED]
"Chris Du" <[EMAIL PROTECTED]> a �crit dans le message de
news:[EMAIL PROTECTED]
> result = JS_CallFunctionName(cx, glob, "call", 0, NULL, &myval);
> if(JSVAL_IS_STRING(myval)){
> printf("%s\n", JS_GetStringBytes(JSVAL_TO_STRING(myval)));
> }
>
> Refer to js-1.5-rc6a\js\src\js.c and hello.js
>
> "B�atrice Philippe" <netscape.public.mozilla.embedding> wrote in message
> news:[EMAIL PROTECTED]
> > Hello !
> > after a web page loaded, my c++ application analyses the Dom. Some href
> > links look like this :
> > "<a
> > href="javascript:DisplayPopUp('shelf/ZoomCover.asp?SomeArguments')">..."
> >
> > Because the above link is in javascript, i'd like to call the javascript
> > function "DisplayPopUp" with its arguments
> > in my c++ application, in order to resolve the href.
> >
> > I had a look in the "javascript reference implementation" on the mozilla
> > web
> > site and i didn't understand all of the document.
> > I saw i could execute a script ... but i don't know how to call a
> > javascript
> > function in my C++ app.
> >
> > Any idea ?
> >
> > The last question : is there any way to simulate a javascript "onclick"
> > event ?
> >
> > Thank you.
> > --
> > B�atrice Philippe
> >
> > [EMAIL PROTECTED]
> >
> >
>
>
>
_______________________________________________
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding