Following things done
1) Added cleanHTML prototype to clear all errors.
2) Footer and close button are not in same line by adding CSS property
<h3 id='modalFoot' style='display: inline-block; text-align: center;  '>"+foot+"</h3>"

But now text and button are stick togeather.