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

Web and WebWorks Development

Reply
Contributor
emsbenitez
Posts: 15
Registered: ‎05-19-2011
My Device: Storm2 9550

Load image on device screen

Hello there! I want to show an image on the screen using its absolute path.

 

I read the in "Accesing Embedded vs File System Resources" from http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Common-BlackBerry-WebWorks-devel...

 

It works for me with embedded image.. but I need to work with File System Resources.. So the user have to choose the file that will be loaded on the screen. My application gets the absolute path of the file ( By example, file:///SDCard/BlackBerry/camera/image.jpg) and does the following:

 

document.getElementById("divv").innerHTML = "<img src='"+path+"' />;

 

where path is the absolute path.. in this case path = "file:///SDCard/BlackBerry/camera/image.jpg"

 

It doesn't work for me.. the image had never been loaded.. :smileysad:

 

 

New Contributor
trvo
Posts: 5
Registered: ‎03-16-2010
My Device: BB Storm 2 9520

Re: Load image on device screen

Hi, I ran into this problem a while back - I no longer have the files but I seem to remember it was a case of adding a permission line to the config xml to allow the app to have file system access. Kind Regards - Trev