• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Webview/innerHTML/images

NeilB

Newbie
Hiya

Help I'm stuck!

I have some html in a webview that is trying to populate a div with some html that contains images. I'm doing this by document.getElementById("mydiv").innerHTML = varContainingHTML;

This works fine in the stock browser, but in the webview its not loading the images. I've checked the server logs and its not even requesting the images from the server. The "main" html page has an image and that loads ok, its just the stuff populated with innerhtml.

Its just as if the webview isn't processing the innerhtml html correctly..

Help!
 
Yup - and the js successfully populates the div with the html, displaying text and a broken image. I've also popped up a Toast showing the content and the <img tag reads ok..
 
Thanks to Ryanteck for having a look (DM'd him).

I *think* I've got it sorted. Appears to have been a mistake in the cache manifest file.. most odd and I don't understand why it was affecting the webview and not the web site.. but hopefully it will carry on working (one of those issues!)
 
Back
Top Bottom