Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!

Impossible to check value of variable?

Avatar

Level 1

We use Neolane 6.1 and in a "Javascript template" we do a check to see if we got an image or not. Before this template runs we set the value '0' if there's no image, consider this code:

var newsImage = '' + content.@img; // string???

if (newsImage && newsImage.length > 4 && newsImage != '' && newsImage != '0') {

  // shows image if image URL and if newsImage == '0' :-O

} else {

  // should end up here if newsImage == '0' but it wont, is this javascript or what is it???

}

0 Replies