11-20-2011 12:03 PM
is the<img> lowsrc attribute recognized in the blackberry web work?
I'm trying to find an effecient way to load images both hi and low res
i tired using a background-image on the <img> itself but doesn't seem to work to well.
11-21-2011 10:43 AM
I'm not pretty sure regarding the lowsrc attribute on webworks since i haven't tried this yet but I hope that you won't mind if I suggest you something else. In my scripts, I took advantage of determining the dimensions of my screen using the screen.width/screen.height properties then makes use of this information to know what to display.
Something like this poorly written block of logic :
if screen.height and screen.width is equal to high res imageRes = '_high' else imageRes = '_low'
myImg.src="../pathToImg/myImg" + imageRes + ".jpg"
Please forgive me for the lack in specifics but hopefully this logic helps you.
Also, if there's anyone out there who has some better idea, hope you'd be too kind to share