Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
New Contributor
olitsch
Posts: 4
Registered: 02-06-2012
My Carrier: n/a

Change Background JPEG Problem

Hello

 

I am trying to change the background image of a <div> like this:

 

 HMTL:

<div id="myId">
//content
</div>

 

SCRIPT:

function onPhotoCaptured(filePath)
{
   document.getElementById("myId").style.backgroundImage = "url(" + filePath + ")";
}

 

It works in Ripple for both JPEG and PNG files but on the Playbook simulator running on WMware it works only for PNG files.

Since all pictures taken by the camera are JPEG i am  a bit stumped.

 

Is there something i need to include or anything to make JPEGs work?

 

Any ideas on a solution?

Please use plain text.