Input labels for dynamically loaded HTML content
- by treznik
I have a form that is dynamically loaded through AJAX and dumped with innerHTML inside an area of a website. The problem I seem to encounter is that the labels don't seem to point to the inputs they're tied to, when clicked.
I'm sure the markup is correct because if I open that form html code separately the labels work.
Is there a solution to re-initialize somehow this sort of event natively? I'm not looking into simulating the behavior with JS.
Thanks!