Are you asking how to pass an argument to a javascript function from
the plugin OR how to return a result back to the plugin from the
javascript function called during the NPN_GetURL call?

Passing arguments to javascript:
char jsCall[256];
sprintf(jsCall, "javascript:test(%d, %s);", errorCode, errorString);
NPN_GetURL(m_npNPInstance, jsCall, NULL);

You can't get a value from the test js function back to the plugin via
NPN_GetURL.  You could send a value back to the plugin using a
scriptable method on its interface.


On Thu, 23 Aug 2001 14:48:18 +0800, "MacTan" <[EMAIL PROTECTED]>
wrote:

>Thanks.
>finally managed to get the callback from plugins to js to work. But now
>encounter another problem.
>My callback function need to return a a few values. How to return the
>values. I tried
>
>NPN_GetURL(m_npNPInstance, "javascript:test(errorCode, errorString);",
>NULL);
>but it don't work.
>
>e.g
>in js:
>test(errorCode, errorString)
>{
>
>}
>


Reply via email to