J
Jure Erznoznik
I just spent the whole day on solving this problem but still have no
success.
This is what i do:
ModalDialog.window = window.open("",
"error",
"toolbar=no,width=" + iWidth + ",height="
+ (iHeight + 100) + "," +
"left=" + cx + ",top=" + cy + "," +
"status=no,resizable=no,modal=yes,dialog=yes");
ModalDialog.window.document.write(wt);
ModalDialog.window.document.close();
wt variable contains the actual HTML to be shown:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Izpis</title>
<link rel="stylesheet" type="text/css" href="/inc/styles.css"/>
<link rel="stylesheet" type="text/css" href="/inc/datepicker.css"/>
<script type="text/javascript" src="/inc/xmlextras.php"></script>
<script type="text/javascript" src="/inc/datepicker.php"></script>
............
</head>
<body onblur="javascript:focusMe()">
............
<div style="height: 120px; width: 100%; overflow: auto; background-image:
url(/images/layout.jpg); color: white">
............
<script type="text/javascript">
var d = new Date();
var dp = new DatePicker(d, true); <---------------------- Error:
DatePicker is undefined
............
</script>
</div>
............
</body>
</html>
This HTML validates OK except for the onblur event of the body tag.
Note the marked line where i try to construct a new DatePicker object.
It works like a charm in FireFox, but not in IE.
If I save the HTML (wt variable) in test.html, it will work correctly (It's
the SAME HTML). It will also work correctly if used in standard page,
generated by php, but NOT when used with Window.Open().
What am I doing wrong?
Any help would be greatly appreciated.
Thanks,
Jure
success.
This is what i do:
ModalDialog.window = window.open("",
"error",
"toolbar=no,width=" + iWidth + ",height="
+ (iHeight + 100) + "," +
"left=" + cx + ",top=" + cy + "," +
"status=no,resizable=no,modal=yes,dialog=yes");
ModalDialog.window.document.write(wt);
ModalDialog.window.document.close();
wt variable contains the actual HTML to be shown:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Izpis</title>
<link rel="stylesheet" type="text/css" href="/inc/styles.css"/>
<link rel="stylesheet" type="text/css" href="/inc/datepicker.css"/>
<script type="text/javascript" src="/inc/xmlextras.php"></script>
<script type="text/javascript" src="/inc/datepicker.php"></script>
............
</head>
<body onblur="javascript:focusMe()">
............
<div style="height: 120px; width: 100%; overflow: auto; background-image:
url(/images/layout.jpg); color: white">
............
<script type="text/javascript">
var d = new Date();
var dp = new DatePicker(d, true); <---------------------- Error:
DatePicker is undefined
............
</script>
</div>
............
</body>
</html>
This HTML validates OK except for the onblur event of the body tag.
Note the marked line where i try to construct a new DatePicker object.
It works like a charm in FireFox, but not in IE.
If I save the HTML (wt variable) in test.html, it will work correctly (It's
the SAME HTML). It will also work correctly if used in standard page,
generated by php, but NOT when used with Window.Open().
What am I doing wrong?
Any help would be greatly appreciated.
Thanks,
Jure