3 Replies Latest reply on Jan 9, 2017 5:37 AM by aduarte RSS
    pjoly Apprentice

    How to load a media in imagelink from javascript ?

    Hello

     

    I would like to change an imagelink property  ("iconLight" ) in javascript code of a service

     

    I have created two medias : lightOFF and lightON

     

    I tried this directly but it does not work :

     

       if ( etatAllumage ) 
        { me.iconLight = "/Thingworx/MediaEntites/lightON" }
        else 
        {me.iconLight = "/Thingworx/MediaEntites/lightOFF"}
    

     

    Should I use a service to update the IMAGELINK property ?

     

    thanks