HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Change an image
Change an image
  View type:
Hi!

I randomly calculate a number 1-50 with javascript. Each number equals to an other picture. Therefore I need to change Object name for an image programatically.

The action below doesn't work:
DISPLAY(Object='var_img',Display='Show',Effect='Object',Duration='0')

Is it possible to change an image by runtime. Perhaps, I have to change runtime.xml (see below)

<![CDATA[<img src="images/r001.jpg" style="width:231px;height:152px;border-width:0;"/>]]>


Thanks for your help.
 
Hi, Erhan,

Unfortunately, not. Object ID field cannot be the variable. The only simple (not compact though) way to do it is the sequence of IFs.[:(]
 
 
Or you could make it in a web page then add this as an Iframe object
Subject:
Message options
No additional options