How i can run this HTM file on Mac

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • buluk1
    New Member
    • Nov 2015
    • 1

    How i can run this HTM file on Mac

    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


    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>
    Last edited by gits; Nov 23 '15, 02:23 PM. Reason: added code tags
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    the point is line 68. the page uses ActiveX controls which are only available in Microsoft Internet Explorer (IE). So in order to get that working you would either have to use it on a Windows machine with that browser - or try to get IE working on the Mac.

    Comment

    Working...