Problem with dmx:parse from table and leaflet maps

Found out that if I put the server connect on the layout page in nodejs then I can reefer to it in the code that is mentioned in the leaflet tutorial. A Quick Leaflet Tutorial
I could not fine out how to get it when clicking on a row in the table or if I put the server connect in the views page, but got it showing the markers when the table is opened.
This is not what I wanted but this is a solution that is good enough for my project.