I've a jquery ajax call:
var popup = function () {
if (myurl) {
$.ajax({
type: "POST",
url: myurl,
data: mydata,
success: function (response) {
// other code here
var x=window.open('', '_blank', 'titlebar=no,scrollbars=yes,menubar=no,height='+height+',width='+width+',resizable=yes,toolbar=no,location=no,location=0,status=no,left='+left+',top='+top+'');
x.document.open();
x.focus();
x.document.writeln(response);
x.document.close();
return false;
},
error: function () {
return false;
},
});
}
};
It worked on all browser (on http), but since I use https, the popup window opens and loops without displaying anything and blocks the browser on IE (I tested on ie 8, 9 and 10). On Chrome and Firefox it continues to work.
EDIT
The response which I write on the popup contains jquery/javascript script which cause the issue. But how could I prevent this?
EDIT2
In the jsp (used to create the popup content) I've put
<script type="text/javascript">
<!--
javascript code
// -->
</script>
This resolves in part the issue.
What for the imported js file?
<script type="text/javascript" src="js/jquery-ui-1.9.1.js"></script>
the path to the jquery file is relative, but the issue still remains. Also if I use external links with https.
If I import js file by using
<!--[if !IE]>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/ui/1.9.1/jquery-ui.min.js"></script>
<![endif]-->
all "works" fine, that is IE browser doesn't block when the popup is opened, but I would a solution that allows the script execution
EDIT3
The issue was caused by the ie compatibility mode IE=8 I removed it from the popup page and its parent page and I resolved on IE 10, but what for IE 8 and 9? (without scripts the popup is well displayed on IE)