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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...