habe mir über die tage ne kleine HP gebastelt .
Leider musste ich nun feststellen das mein DHTML - Nagationsmenü(deep-tree)
leider nicht auf Mozilla (auch Firefox) reagiert !
:flag:
Im IE 6.0 geht alles wunderbar .....
weiß von euch jemand zufällig ne möglichkeit ,
das ich die navigation auch mit Mozilla sehen kann?
habe das ganze momentan noch lokal aufm rechner ....deshalb kein link!
EDIT : htt*://eprom.dyn.ee <-nicht immer Online !!!!
hier der Coode:
HTML-Quellcode
- --
- '*********************************************************************************
- ' COMobjects.NET Deep Tree Script(c) Fedor Skvortsov, COMobjects.NET. November, 2001
- ' Mailto: [email]fed@comobjects.net[/email]
- ' WWW: [url]http://comobjects.net[/url]
- '*********************************************************************************
- -->
- <html>
- <head>
- <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
- <style type="text/css">
- a
- {
- color: #003399;
- text-decoration: none;
- }
- a:hover
- {
- color: red;
- text-decoration: none;
- }
- .load
- {
- font-size: 11px;
- background-color:infobackground;
- border-width:1px;
- border-color:black;
- border-style:solid;
- width:10px;
- }
- LI
- {
- margin-left:-25px;
- list-style-type:none;
- list-style-image:none;
- font-family:verdana;
- font-size:8pt;
- }
- .treenode
- {
- margin-left:3px;
- font-size: 8pt;
- border-width:1px;
- border-color:White;
- border-style:solid;
- }
- .treenodesel
- {
- font-size: 8pt;
- margin-left: 3px;
- border-width:1px;
- border-color:Navy;
- border-style:solid;
- }
- .treenodeover {
- margin-left:3px;
- font-size: 8pt;
- border-width:1px;
- border-color:White;
- border-style:solid;
- }
- .treenodeselover
- {
- font-size: 8pt;
- margin-left: 3px;
- border-width:1px;
- border-color:Blue;
- border-style:solid;
- }
- </style>
- <script language="jscript">
- //Root Tree
- var sRootTree = "TOC/Root.xml"
- //Images
- var sImagesPath = "Images/";
- var sImageNone = sImagesPath + "none.gif";
- var sImagePlus = sImagesPath + "plus.gif";
- var sImageMinus = sImagesPath + "minus.gif";
- //Styles
- var sNodeLoadingClass = "load";
- var sNodeClass = "treenode";
- var sNodeOverClass = "treenodeover";
- var sNodeSelClass = "treenodesel"
- var sNodeSelOverClass = "treenodeselover"
- //Text
- var sCancelLoad = "Loading...";
- //XML Document which contains tree
- var oXML;
- //Base href for current loading node
- var sBaseHref;
- //Selected node
- var oSelNode;
- //Curent loading node. Only one node can be being loading at one moment!*/
- var loadingNode;
- //Show loading node [Loading...]
- function showLoadingNode(Node){
- var oDiv;
- oDIV = document.createElement("<div>");
- oDIV.className = sNodeLoadingClass;
- oDIV = Node.appendChild(oDIV);
- oDIV.innerText = sCancelLoad;
- oDIV.onclick = cancelLoad;
- }
- //Hide loading node
- function hideLoadingNode(Node){
- try{
- if (Node.childNodes.length>1){
- oDIV = Node.childNodes(1);
- Node.removeChild(oDIV);
- }
- }
- catch(x){}
- }
- //This function builds tree.
- //Parameter sourceNode is a XML source node, resultNode is a produced HTML node,
- //expanded specifies whether display resultNode expanded or not.
- function buildTree(sourceNode, resultNode, expanded){
- var oLI, oUL, oIMG, oA, oNOBR, i, oNodeAttributes;
- var sIcon, sName, sHref, sTarget, sSrc;
- //Create container for child nodes
- oUL = document.createElement("<ul>");
- oUL = resultNode.appendChild(oUL);
- //if node expanded then display container
- if (expanded=="true"){
- oUL.style.display="block";
- }
- else{
- oUL.style.display="none";
- }
- //Run over nodes in XML source
- for (i=0;i<sourceNode.childNodes.length;i++){
- //Set obligatory values
- oNodeAttributes = sourceNode.childNodes(i).attributes;
- sIcon = oNodeAttributes.getNamedItem("icon").value;
- sName = oNodeAttributes.getNamedItem("name").value;
- //Set optional values
- if (oNodeAttributes.getNamedItem("href")!= null){
- sHref = oNodeAttributes.getNamedItem("href").value;
- }
- else{
- sHref = "";
- }
- if (oNodeAttributes.getNamedItem("target")!=null){
- sTarget = oNodeAttributes.getNamedItem("target").value;
- }
- else{
- sTarget = ""
- }
- //Create node
- oLI = document.createElement("<li>");
- oLI = oUL.appendChild(oLI);
- oNOBR = document.createElement("<nobr>");
- oNOBR = oLI.appendChild(oNOBR);
- //Create action image
- oIMG = document.createElement("<img>");
- oIMG.border = 0;
- //If src attribute is not empty, add custom attribute to the result node
- if (oNodeAttributes.getNamedItem("src")!=null){
- sSrc = oNodeAttributes.getNamedItem("src").value;
- }
- else{
- sSrc = "";
- }
- oLI.setAttribute("src", sSrc);
- //If src attribute is not empty or amount of the child nodes is not equals zero
- if (sSrc!="" || sourceNode.childNodes(i).childNodes.length>0){
- //If sub nodes was not loaded
- if (sSrc!=""){
- oLI.setAttribute("LoadedChildren", "false");
- }
- //If sub nodes are already loaded
- else{
- oLI.setAttribute("LoadedChildren", "true");
- }
- oIMG.src = sImagePlus;
- oLI.setAttribute("Expanded", "false");
- //Set action image event handler
- oIMG.onclick = actionOnClick;
- }
- else{
- oIMG.src = sImageNone;
- }
- //Create icon image
- oIMG = oNOBR.appendChild(oIMG);
- oIMG = document.createElement("<img>");
- oIMG.border = 0;
- oIMG.src = sImagesPath + sIcon + ".gif";
- oIMG = oNOBR.appendChild(oIMG);
- oA = document.createElement("<a>");
- if (sHref!=""){
- oA.href = sBaseHref + sHref;
- //Set event handler for node
- oA.onclick = nodeOnClick;
- oA.onmouseover = nodeOnMouseOver;
- oA.onmouseout = nodeOnMouseOut;
- }
- if (sTarget!=""){
- oA.target = sTarget;
- }
- oA.innerText = sName;
- oA.title = sName;
- oA.className = "treenode";
- oA = oNOBR.appendChild(oA);
- if (sourceNode.childNodes(i).childNodes.length>0)
- {
- //Assembly subtree
- buildTree(sourceNode.childNodes(i), oLI, "false")
- }
- }
- //Add custom attributes to resultNode which specifies whether node loaded children or not and
- //whether is was expanded or not
- resultNode.setAttribute("LoadedChildren", "true")
- resultNode.setAttribute ("Expanded", expanded);
- }
- //ÍÀ×ÈÍÀÉ ÏÐÎÂÅÐßÒÜ ÇÄÅÑÜ, ÍÅ ÇÀÁÓÄÜ ÓÄÀËÈÒÜ
- //This function handle OnClick event on action image
- //ÊÎÍ×ÀÉ ÏÐÎÂÅÐßÒÜ ÇÄÅÑÜ, ÍÅ ÇÀÁÓÄÜ ÓÄÀËÈÒÜ
- function actionOnClick(){
- var oNode
- oNode = event.srcElement;
- event.cancelBubble = true;
- //If node is already expanded we collapse it
- if (oNode.parentNode.parentNode.getAttribute ("Expanded")=="true"){
- oNode.parentNode.parentNode.childNodes(1).style.display = "none";
- oNode.parentNode.parentNode.childNodes(0).childNodes(0).src = sImagePlus;
- oNode.parentNode.parentNode.setAttribute ("Expanded", "false")
- }
- //If node is collapsed expand it
- else{
- //If children nodes are already loaded, just expand it
- if (oNode.parentNode.parentNode.getAttribute("LoadedChildren")=="true"){
- oNode.parentNode.parentNode.childNodes(1).style.display = "block";
- oNode.parentNode.parentNode.childNodes(0).childNodes(0).src = sImageMinus;
- oNode.parentNode.parentNode.setAttribute ("Expanded", "true")
- }
- //Children nodes are not loaded yet, we need to load it
- else{
- //If the other nodes are loaded at the current time, we should stop it
- if (loadingNode!=null){
- hideLoadingNode(loadingNode);
- }
- //Set new node
- loadingNode = oNode.parentNode.parentNode;
- //Show loading node
- showLoadingNode(loadingNode);
- //Assembly subtree
- oXml.load(loadingNode.getAttribute("src"));
- }
- }
- }
- //This function handles OnClick event on link
- function nodeOnClick(){
- var oNode
- oNode = event.srcElement;
- event.cancelBubble = true;
- if (oSelNode!=null)
- {
- oSelNode.childNodes(0).childNodes(2).className = sNodeClass;
- }
- oSelNode = oNode.parentNode.parentNode;
- oSelNode.childNodes(0).childNodes(2).className = sNodeSelOverClass;
- //Add your code to handle this event
- }
- //This function handles OnMouseOver event on link
- function nodeOnMouseOver(){
- var oNode
- oNode = event.srcElement;
- event.cancelBubble = true;
- window.status = oNode.innerText;
- if (oNode.className==sNodeSelClass){
- oNode.className = sNodeSelOverClass;
- }
- else{
- oNode.className = sNodeOverClass;
- }
- //Add your code to handle this event
- }
- //This function handles OnMouseOut event on link
- function nodeOnMouseOut(){
- var oNode
- oNode = event.srcElement;
- event.cancelBubble = true;
- window.status = "";
- if (oNode.className==sNodeSelOverClass){
- oNode.className = sNodeSelClass;
- }
- else{
- oNode.className = sNodeClass;
- }
- //Add your code to handle this event
- }
- //This function handles OnClick event on loading node
- function cancelLoad(){
- var oNode
- oNode = event.srcElement;
- hideLoadingNode(oNode.parentElement);
- loadingNode = null;
- }
- function initPage(){
- oSelNode = null;
- //set loadingNode to the tree container
- loadingNode = document.all("Tree");
- oXml = new ActiveXObject("Microsoft.XMLDOM");
- //Change this property to false if you are working in synchronous mode
- oXml.async = true;
- //set handler for xml data loading event
- oXml.onreadystatechange = onLoadXml;
- //load root xml data source
- oXml.load(sRootTree);
- }
- //This function parses and builds tree when XML data source has been loaded
- function onLoadXml(){
- //test if xml was fully loaded (COMPLETED(4))
- if (oXml.readyState==4){
- hideLoadingNode (loadingNode);
- //test if xml is well formed and contains other than documentElement nodes
- if ((oXml.parseError.reason=="") && (oXml.documentElement.childNodes.length>0)){
- if (loadingNode!=document.all("Tree")){
- loadingNode.childNodes(0).childNodes(0).src = sImageMinus;
- }
- //Set sBaseHref which specifies the baseline URL
- sBaseHref = oXml.documentElement.attributes.getNamedItem("base").value;
- //Building treeview starts with documentElement of XML and loading node
- //We expand only one level of deep treeview, so we just pass "true" value in this call
- buildTree(oXml.documentElement, loadingNode, "true");
- }
- else
- {
- //If subtree loading have been failed, change action image to none and remove event handler
- loadingNode.childNodes(0).childNodes(0).src = sImageNone;
- loadingNode.childNodes(0).childNodes(0).onclick = null;
- }
- //Actions with loading node are finished, so set it to null
- loadingNode = null;
- }
- }
- </script>
- <base target="Hauptframe">
- </head>
- <body onload="initPage();" bgcolor="#FFFFFF">
- <div id="Tree" style="margin-left:-20px;">
- </div>
- </body>
- </html>