Hello,
I want to read this htm file on a Mac.
I think I need a special librairy.
I don't know
Can you help me ?
Thanks in advance
File name : ExamLink.htm
I want to read this htm file on a Mac.
I think I need a special librairy.
I don't know
Can you help me ?
Thanks in advance
File name : ExamLink.htm
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<script type="text/javascript">
<!--
var max_directory = 999;
function check_this_browser()
{
if (window.ActiveXObject)
{
return 0;
}
else if (document.implementation && document.implementation.createDocument)
{
return 1;
}
return -1;
}
function create_row(tmp, url)
{
var x = xmlDoc.getElementsByTagName('patient');
var theData;
var row = document.createElement('TR');
for (j=0;j<x[0].childNodes.length;j++)
{
if (x[0].childNodes[j].nodeType != 1) continue;
var container = document.createElement('TH');
if (x[0].childNodes[j].firstChild)
theData = document.createTextNode(x[0].childNodes[j].firstChild.nodeValue);
else
theData = document.createTextNode(' ');
container.appendChild(theData);
row.appendChild(container);
}
var container = document.createElement('TH');
theData = document.createElement('A');
theData.setAttribute('href', url);
theData.setAttribute('target', '_blank');
theText = document.createTextNode(url);
theData.appendChild(theText);
container.appendChild(theData);
row.appendChild(container);
tmp.appendChild(row);
}
var xmlDoc;
function explorer_check_directory()
{
var header = new Array('Date examen',
'ID patient ',
'Nom patient ',
'Sexe',
'Date naissance',
'Age',
' ');
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false
var newEl = document.createElement('TABLE');
newEl.setAttribute('border',1);
var tmp = document.createElement('TBODY');
newEl.appendChild(tmp);
var row = document.createElement('TR');
for (j=0;j<7;j++)
{
var container = document.createElement('TH');
var theData = document.createTextNode( header[j] );
container.appendChild(theData);
row.appendChild(container);
}
tmp.appendChild(row);
for ( var no = 100; no<= max_directory; no++)
{
try {
var url = no +'OLCV1/ExamInfo.xml';
if (xmlDoc.load(url))
create_row(tmp, url);
} catch(e) {
}
}
document.body.appendChild(newEl);
}
function check_directory()
{
var type = -1;
type = check_this_browser();
if ( 0 == type )
explorer_check_directory();
else
alert('Your browser can\'t handle this script');
}
-->
</script>
<body onload="check_directory()">
</body>
</html>
Comment