PDA

View Full Version : Bug in Javascript function Cbnr on webpsite



birdman
24-02-16, 11:53
There is an annoying bug in part of the Javascript code for the site.

When you view a forum entry there is a changeable banner image displayed. The changing is handled by a Javascript function called Cbnr

However if, for some reason, it isn't able to get the image then replacement text is displayed - and this is a changing list of model names,

The problem is that the model names are of different lengths, the text is put into a narrow block and so it flips between 2, 3 and 4 lines in length. This makes the whole of the rest of the page bob up and down - annoying when you are reading and even more annoying when you are replying to a message.

I suspect it half thinks it has an image and half- thinks it hasn't.

No idea why it thinks it hasn't got an image (I can get to them all)

Sicilian
24-02-16, 15:01
You have a screenshot?

birdman
24-02-16, 18:35
You have a screenshot?Not at the moment,. It only happens occasionally, and I was in a rush to go out at the time so I really put this here as a placeholder for me to look at later.

Oddly the "offending" banner is totally absent from this page as I type now. The functions is defined, but nothing showing...

abu baniaz
28-02-16, 14:57
Is this what you mean?

birdman
28-02-16, 15:41
Yes - sort of. But not what you've ringed
The image that shows the problem is that ~1/3rd width one at the top (...only £89).

If that image is missing then the ALT text gets put into a narrow text box, 1 word per line. And some the descriptions have 3 or 4 (possibly 2 as well) lines, so the rest of the page bobs up and down as it cycles through the options.

I can't reproduce it. It only happens occasionally. In fact I don't normally see any page that displays that image at all (as an image or as the ALT text).