Jump to content

Object Reference in JS


cristianotestai

Recommended Posts

Hi Farshad,

 

I need to specify an object (UniPanel) concatenating strings in JS. I tried following in run-time, but without success, everything is ok, only the last statement does not work, because he does not understand 'UniPanel+usuid':

 

UniImage1.ClientEvents.ExtEvents.Values ​​['onclick'] = 'onclick function (sender)' +

'{var usuid = Main.UniPanel1.UsuId;' +

' Main.UniPanel1.UsuId =' + IntToStr (UsuId) + ';' +

' Main'. UniImage1.Parent.Name + '. body.applyStyles(' + QuotedStr('background-color: #FDEDE3')+');'

' Main'. + 'UniPanel+usuid' + '. body.applyStyles(' + QuotedStr('background-color: #FDFCFB')+');'

'}';

 

 

In the last statement, the translation will be for example "Main.UniPanel2.body.apply...", where in this example the value of "usuid" variable = 2.

How to perform the concatenation correctly for him to find the object?

 

Tkanks.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...