0

I am trying to add some local image icon after the url on web page in web view.

The piece of JS function code trying to execute is

var anchors = document.getElementsByClassName('title');
var img = new Image(); 
img.src = 'file:///android_asset/high.png'; 
for (var i=0; i<anchors.length; i++)
{ 
    links.push(anchors[i].children[0].href); 
    var tag = anchors[i].children[0];
    tag.insertAdjacentHTML('AfterEnd', '&nbsp;&nbsp;<img src=img alt=\"My Image\"/>');
}

Can not see the image appended, whereas I am getting error "Not Allowed to load local resources" My question is Why I am not able to see images ? and also I am getting above error.

mask
  • 6,172
  • 3
  • 24
  • 23
  • http://stackoverflow.com/questions/9758756/android-not-allowed-to-load-local-resourcefile-android-asset – tiguchi Jul 16 '12 at 19:43
  • There are similar post but they are about using loadUrl and so on. I want to load these images by using insertAdjacentHTML JS function. – mask Jul 16 '12 at 22:01

0 Answers0