Take a look at the following code for a standard class. I initialize the class and I set the PaginationID with the correct ID (which is not 'ulist' but connect it to the ulist JQueryElement which is a general JQueryElement) from the HTML page. The class renders correctly the pagination but there is a problem with the click event. Why doesn't the ulist_click event fire? (pagination in bootstrap 5 is an unordered list with listitems).
ClassCode:
Private Sub Class_Globals
Private ulist As JQueryElement
Private wslocal as WebSocket
Private parObj As Object
Private sEv As String
Private wslocal As WebSocket
Private connLocal As SQL
Private PaginationIDLocal As String
End Sub
Public Sub Initialize(Parent As Object, conn As SQL, ws As WebSocket, EventName As String)
parObj = Parent
sEv = EventName
wslocal = ws
connLocal = conn
End Sub
Public Sub setPaginationID(PaginationListID As String)
ulist = wslocal.GetElementById(PaginationListID)
PaginationIDLocal = PaginationListID
End Sub
Public Sub ulist_Click(Params As Map)
Log(Params)
End Sub
Last edited: