Jason Carmen
Posts: 0
Joined: Wed Mar 05, 2014 1:51 pm

How do you set an image value to a url when a value is selected in a Select control?

Okay here is the deal:

Image control on start screen

API loaded Select control on start screen

Select value change -- set [image control].imageValue property to value imageURL on Select control so that when I select a team the logo show up in the image control

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How do you set an image value to a url when a value is selected in a Select control?

Hi Jason,

Please follow these steps:
ol
lidesign -open Event bottom panel-choose your select in "component";/li
liChoose "Value changed" in Event select;/li
liChoose "Run JavaScript" in Action Select;/li
ol
liPopulate handler with the following JS code:/li
/ol
/ol
pre
var value = jQuery(this).val();

//Need to get image by select value.
var imageURL = "";

//Populate image by url.
Appery("imageAppery_Name").attr("src", imageURL);
/pre

That's all.

Regards.

Return to “Issues”