<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*" errorPage="" %> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href='CSS/TISCO.css' rel='stylesheet' type='text/css'> <style type="text/css"> <!-- #foldheader{cursor:pointer;cursor:hand ; list-style-image:url(images/fold.gif)} #foldinglist{list-style-image:url(images/list.gif)} .page_font { font-family: "Microsoft Sans Serif"} a:link { color: #005CA2; text-decoration: none} a:visited { color: #666666; text-decoration: none} a:active { color: #009900; text-decoration:none} a:hover { color: #0099FF; text-decoration: none} --> </style> <SCRIPT src="../js/menu.js"></SCRIPT> </head> <body> <form method="post"> <!----------BEGIN CSC INITIAL ZONE ------------------------> <%=screen.InitialVariable()%> <!----------END CSC INITIAL ZONE --------------------------> <script language="javascript"> var xmlDoc; var xmlList; if (document.implementation && document.implementation.createDocument) { alert("XML CASE 1"); xmlDoc = document.implementation.createDocument("", "", null); xmlDoc.load("test.xml"); //xmlDoc.onload = ShowMozilla; //xmlList=xmlDoc.getElementsByTagName("PROCESS_LOG"); } else if (document.documentElement && document.documentElement.applyElement) { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async=false; xmlDoc.load("test.xml"); xmlList=xmlDoc.getElementsByTagName("EMPLOYEE"); ShowData(); } else { alert('Your browser can\'t handle this script'); } function ShowData() { document.write(xmlList.length); document.write("<div align='center'>"); document.write("<table>"); document.write("<tr><td class='header'>Error Working Time </td></tr>"); document.write("<tr><td colspan='2'><div align='center'><br>"); document.write("<table class='largest' border='1' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF'>"); document.write("<tr><td width='4%'> </td><td width='96%'><div nowrap>"); document.write("<ul id='foldinglist' style=&{head};>"); for(var i=0;i<xmlList.length;i++) { if(xmlList.item(i).hasChildNodes()) { document.write("<li id='foldheader'><a href='CI02_1.jsp?jobid="+xmlList.item(i).getAttribute("id")+"'>"+ xmlList.item(i).getAttribute("subindex")+"</a></li><ul id='foldinglist' style='display:none';>"); } else { if(xmlList.item(i).nextSibling) { document.write("<li>"+xmlList.item(i).getAttribute("id")+"</li>"); //alert(xmlList.item(i).nextSibling.getAttribute("tdesc")); } else { document.write("<li>"+xmlList.item(i).getAttribute("id")+"</li></ul>"); } } } document.write("</ul>"); document.write("</div></td></tr></table><br></div></td></tr>"); document.write("<tr><td class='bottom'></td></tr></table><br></div>"); } </script> </form> </body> </html>