My page has two components that depend on Javascript. On the left hand side, there is a attribute base navigation (abn). And the right hand side is the Result of the abn.
There is an event handler for abn and an event handler for the result (both are on clicks) Whenever the user clicks on the abn, I do an ajax call which returns a json object where the html result is a value of one of the key/value pair. The html is being inserted into the result component.
The event handler for the result of the page works fine on a page refresh. It stops working when I insert the html content into the result slot after the ajax call. I have verified that the result has all the divs and class that my javascript depends on.
I think when I replaced the html content, the javascript handler just stop working. Can someone explain why this is happening and how I can solve this?