Problem with JS function

Luciano Montanaro mikelima at virgilio.it
Thu Jul 3 15:23:03 CEST 2003


On Thursday 03 July 2003 13:39, Caterina Torrisi wrote:
> Hi,
> I've made an extension to Konqueror creating new add-ons.
>  I need to make a call to a JavaScript function which name is in a variable
> that is a string. I received the variable as an argument from another
> JavaScript function. I would like to know if there is a way to do it.
>

The function you are referring to is an add-on method isn't it?
To evaluate a piece of javascript code, you have to call the interpreter
evaluate() method.

For the snapshot konq-embedded, You can use something like

UString jsCode("alert(\"Ciao Mondo!\");");

KJScript::current()->evaluate(jsCode);

Luciano


More information about the konq-e mailing list