D
dgl3906464
All,
I've seeing a very odd behavior:
I've got a treeview control (implemented with treeview.htc) that
renders fine.
If I put that treeview on a page, it renders and behaves normally.
If I put that treeview into a popup (created with
window.createPopup()), it renders fine, but the onDocumentReady event
never fires. onContentReady does, but onDocumentReady does not?
What's that leave me? A treeview that renders with no events
attached?
Very very odd.
<HTML><!-- XMLNS:mytree>-->
<head>
<!-- <?IMPORT NAMESPACE="mytree" IMPLEMENTATION="treeview.htc"/> -->
<title>TreeCwbs</title>
<script>
function makePopup(x,y){
var oCWBSPopup
if(!window.oCWBSPopup) {
oCWBSPopup = window.createPopup();
oCWBSPopup.document.body.style.border="2px white window-inset";
// as you can see, we're making a poup with an embedded treeview
// using write, we can set the namespace and perform an import
// directive - remember that these elements are not in the DOM
// and are not scriptable. The tree RENDERS fine, but never
// attaches events, and the onDocumentReady event never fires.
var popupBody[0] = '<HTML XMLNS:mytree><HEAD>';
popupBody[1] = '<?IMPORT NAMESPACE="mytree" ';
popupBody[2] = ' IMPLEMENTATION="treeview.htc"/>';
popupBody[3] = '</HEAD><BODY>';
popupBody[4] = '<mytree:treeview id="tree1" ';
popupBody[5] = ' TreeNodeSrc="template.xml" ';
popupBody[6] = ' TreeNodeXsltSrc="template.xsl" />';
popupBody[7] = '</BODY></HTML>';
oCWBSPopup.document.write(popupBody.join(''));
window.oCWBSPopup = oCWBSPopup;
} else
oCWBSPopup = window.oCWBSPopup;
oCWBSPopup.show(x-5,y-5,500,300,document.body);
}
</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<span onclick="makePopup(event.x,event.y);" >
<img src="images/folder.gif"/>
</span><br/>
<!-- When the HTML comment blocks are
un-commented, the regular treeview below
works fine -->
<!--
<mytree:treeview id="tree1"
TreeNodeSrc="template.xml"
TreeNodeXsltSrc="template.xsl" /> -->
</form>
</body>
</HTML>
Suggestions?
-Daniel
I've seeing a very odd behavior:
I've got a treeview control (implemented with treeview.htc) that
renders fine.
If I put that treeview on a page, it renders and behaves normally.
If I put that treeview into a popup (created with
window.createPopup()), it renders fine, but the onDocumentReady event
never fires. onContentReady does, but onDocumentReady does not?
What's that leave me? A treeview that renders with no events
attached?
Very very odd.
<HTML><!-- XMLNS:mytree>-->
<head>
<!-- <?IMPORT NAMESPACE="mytree" IMPLEMENTATION="treeview.htc"/> -->
<title>TreeCwbs</title>
<script>
function makePopup(x,y){
var oCWBSPopup
if(!window.oCWBSPopup) {
oCWBSPopup = window.createPopup();
oCWBSPopup.document.body.style.border="2px white window-inset";
// as you can see, we're making a poup with an embedded treeview
// using write, we can set the namespace and perform an import
// directive - remember that these elements are not in the DOM
// and are not scriptable. The tree RENDERS fine, but never
// attaches events, and the onDocumentReady event never fires.
var popupBody[0] = '<HTML XMLNS:mytree><HEAD>';
popupBody[1] = '<?IMPORT NAMESPACE="mytree" ';
popupBody[2] = ' IMPLEMENTATION="treeview.htc"/>';
popupBody[3] = '</HEAD><BODY>';
popupBody[4] = '<mytree:treeview id="tree1" ';
popupBody[5] = ' TreeNodeSrc="template.xml" ';
popupBody[6] = ' TreeNodeXsltSrc="template.xsl" />';
popupBody[7] = '</BODY></HTML>';
oCWBSPopup.document.write(popupBody.join(''));
window.oCWBSPopup = oCWBSPopup;
} else
oCWBSPopup = window.oCWBSPopup;
oCWBSPopup.show(x-5,y-5,500,300,document.body);
}
</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<span onclick="makePopup(event.x,event.y);" >
<img src="images/folder.gif"/>
</span><br/>
<!-- When the HTML comment blocks are
un-commented, the regular treeview below
works fine -->
<!--
<mytree:treeview id="tree1"
TreeNodeSrc="template.xml"
TreeNodeXsltSrc="template.xsl" /> -->
</form>
</body>
</HTML>
Suggestions?
-Daniel