Welcome!

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

Native Development

Reply
New Contributor
Posts: 5
Registered: ‎04-21-2013
My Device: Z10
My Carrier: P4
Accepted Solution

WebView doesn't process Javascript

Hello,

I'm trying to load a simple web page in WebView. The page only runs some Javascript function which allows user to browse some files. When I type the address to BlackBerry browser, everything works fine, but when I try to load the same page in WebView - nothing happens, no Javascript content is presented.

 

Any ideas? 

 

Thanks

Developer
Posts: 1,168
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: WebView doesn't process Javascript

Without seeing the JavaScript in question I can't make much of a guess, but are you familiar with WebKit remote debugging? WebView is a WebKit-based renderer, and as such it supports remote debugging with a Chrome browser. You have to turn on the feature in the WebView settings with settings.webInspectorEnabled.

 

Google WebInspector for more info on how to get started.

 


bartoooL2 wrote:

Hello,

I'm trying to load a simple web page in WebView. The page only runs some Javascript function which allows user to browse some files. When I type the address to BlackBerry browser, everything works fine, but when I try to load the same page in WebView - nothing happens, no Javascript content is presented.

 

Any ideas? 

 

Thanks






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
New Contributor
Posts: 5
Registered: ‎04-21-2013
My Device: Z10
My Carrier: P4

Re: WebView doesn't process Javascript

Thank you for your reply.

My problem was that I used setHtml() on my WebView. When I modified my code to work with setUrl() everything works fine Smiley Happy

Thank you, regards
Developer
Posts: 1,168
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: WebView doesn't process Javascript

Ahh, that makes sense. don't forget to mark your topic as solved.



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.