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
New Developer
Posts: 2
Registered: ‎09-22-2009
My Device: Not Specified

Web Images will not display via IMG tag, but work fine with Direct URL

We have a photo rotator page that contains an image, a description and forward and back links.

 

The page will NOT display the image (all other devices and browsers work fine). We are using BB emulator for the  

9000, 8900, 9500, 8120, 8830, and 9630. Also tested on a real BB Curve 8830.

 

The markup looks like this (note that this is a MS MVC route)

...

<img alt="Photo" src=http://dev2.trendmls.com/m/Image/Index/Listing/123456789/1 width="200"

height="150"></img>

 

The page with this tag will not render the image. Note that we have tried variations with dropping all attributes  (alt, height, width), and with a self-closing IMG tag.

 

The kicker is, if we just paste the image URL directly into the BB address bar, it renders just fine.

 

We'd really appreciate some insight into this phenomenon.

 

 

 

New Developer
Posts: 4
Registered: ‎08-11-2008
My Device: Not Specified

Re: Web Images will not display via IMG tag, but work fine with Direct URL

[ Edited ]
Do you have quotes around the src attribute? Also IMG is a self closing tag, try this:

<img alt="Photo" src="http://dev2.trendmls.com/m/Image/Index/Listing/123456789/1" width="200" height="150"/>
Message Edited by jackbishop1 on 09-23-2009 01:57 PM
New Developer
Posts: 2
Registered: ‎09-22-2009
My Device: Not Specified

Re: Web Images will not display via IMG tag, but work fine with Direct URL

Of course there are quotes around my img SRC url.

 

As noted in the post, we tried self-closing tags too. Unfortunately, we need to force a close tag because some devices don't like the single, self closing tags.

 

Works fine in all other devices tested.

 

Interestingly, one developer got a newer emulator version and instead of a borked image, his BB emulator shows a 0 byte image. Same exact markup.