Thanks Mike, The problem seems to be the popup is showing another aspx page, two body tags and two Script blocks are causing the problem. I tried using iframe as follows and it solved the problem.
open: function () {
var url = 'test.aspx';
$(this).html('<iframe style="border: 0px; " src="' + utl + '" width="100%" height="100%"></iframe>');
}
Sorry, I should have been a bit more clear here.