Hi, i’ve made a custom control with websdk, a listbox that contains images in rows. (modifying a demo on the blogs post of xojo)
The control works well, but i have problem adding javascript in runtime, in the method that build html for the control i have this line:
dim sa() as String
sa.Append "<a href=""javascript:Xojo.triggerServerEvent("+ Chr(39) + ParentControlID + Chr(39) + "," + Chr(39) + eventClicked + Chr(39) + ",[" + Chr(39) + rowId + Chr(39) + "]);"">"
....
if i build the component HTML at startup all works well, if i build it in runtime (i have a function that read a mysql db and fill the listbox) i’ve got this error:
[quote]Could not execute returned javascript: Expected an identifier but found ‘OBZOHSJi’ instead
Source: Xojo.get(‘OBZOHSJi’).innerHTML =[/quote]
it seems that in runtime the characher ’ (chr 39) is interpreted in another way, i haven’t found any workaround