How should I update the Pop-up height when a new DOM element is added?

2
Via Javascript the required height of a pop-up window is calculated based of the dimensions of it's content. When a DOM element is added, however, the height doesn't get's recalculated. This often causes the 'next/save' button to disappear outside the bounds of the container's height. This can cause confusion to the user. And as I could write a custom Javascript function to recalculate the height and update the pop-up..  I was wondering what would be the best way to recalculate and update the height of the pop-up window? Should I create a new JS script or can I trigger a specific script to do it all for me?
asked
0 answers