Problem with JS function
Paul Chitescu
Paul.Chitescu at IMC-Group.org
Thu Jul 3 15:58:47 CEST 2003
"Caterina Torrisi" <ctg at tid.es> 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.
>
> Thanks in advance.
> Caterina Torrisi
That's not Konq/E related but generic Javascript.
See the standard eval() method of every object (but not DOM nodes - so no
document.eval()). It evaluates it's string argument in the context of the
object.
var my_string='window.alert("Hi, there!")';
result=window.eval(my_string);
--
Paul Chitescu
pchitescu at null.ro http://pchitescu.null.ro/ ICQ:22641673
Any spammers will be painfully squeezed into /dev/null
More information about the konq-e
mailing list