Problem with dmx:parse from table and leaflet maps

I have the map displayed on the page and I manage to use a button to display a marker. But I am not able to get the lat/lon info from the bootstrap 5 table when I click on a row. I am using nodejs. I have tried several ways to get the data from he table on to the map but I always get a error “Invalid latlon object” here is a picture of the code.

Is it possible to get this working somehow.
I managed to get the wrong picture here. Has changed it to the correct one

I don’t think you need the var; bit at the start of the click event

The var; bit in the start was just a type error on my part has changed it to a new picture.

You could try assigning the variables first.

var lat = dmx.parse('lengde'); var lng = dmx.parse('bredde'); var marker = L.marker([lat,lng]).addTo(map);

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.