cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How to load a media in imagelink from javascript ?

pjoly
11-Garnet

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

1 ACCEPTED SOLUTION

Accepted Solutions
aduarte
6-Contributor
(To:pjoly)

Hello,

  Have you tried to put only your entity name?

   if ( etatAllumage )  

    { me.iconLight = "lightON" } 

    else  

    {me.iconLight = "lightOFF"}

View solution in original post

3 REPLIES 3
aduarte
6-Contributor
(To:pjoly)

Hello,

  Have you tried to put only your entity name?

   if ( etatAllumage )  

    { me.iconLight = "lightON" } 

    else  

    {me.iconLight = "lightOFF"}

pjoly
11-Garnet
(To:aduarte)

it works fine !

Thanks i was looking for too much complex things  ;-)

Regards

aduarte
6-Contributor
(To:pjoly)

I'm glad that it works

Top Tags