Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

New Contributor
Posts: 4
Registered: ‎10-07-2011
My Device: 9980
My Carrier: rogers

BrowserField2:executeScript("") doesn't work. Help!

I tried to execute a javascript function defined in the web page. In the BrowserFieldListener's documentLoaded function, I tried to execute the function like this:

browserField.getScriptEngine().executeScript("f()", null);

//same thing for the following



But seems BrowserField2 can't find the javscript function in the web page. This is the exeception:

ExecuteScript Exception: ReferenceError: Can't find variable: f