I have a jQuery dialog which loads an external php page. All is working fine except in Internet Explorer (8) the css is switched on and then off again when the dialog is loaded. This means the dialog is transparent!
When I drag the dialog the style is applied again, and it keeps applied.
This the dialog load method.
<script>
$(document).ready(function() {
//select all the a tag with name equal to modal
$('a[name=eventform]').click(function(e) {
//Cancel the link behavior
e.preventDefault();
$("#dialog").load(e.target.href).dialog({
title : 'Activity'
});
});
});
</script>
And this is the external page. All works fine in Firefox but the style is removed somehow when loading in Internet Explorer.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?php echo $pgtitle ?></title>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.21.js"></script>
<link rel="stylesheet" type="text/css" href="calendar/css/popwin.css" />
</head>
<body>
......
I tried to use the @import to get the stylesheet but this makes no difference.
The same issue appears on Internet Explorer 9 but there it happens sometimes (????).
Thanks,
Coen
Try this: