473,408 Members | 1,788 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How i can run this HTM file on Mac

1
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


Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4. </head>
  5. <script type="text/javascript">
  6. <!--
  7. var max_directory = 999;
  8.  
  9. function check_this_browser()
  10. {
  11.     if (window.ActiveXObject)
  12.     {
  13.         return 0;
  14.     }
  15.     else if (document.implementation && document.implementation.createDocument)
  16.     {
  17.         return 1;
  18.     }
  19.  
  20.     return -1;
  21. }
  22.  
  23. function create_row(tmp, url)
  24. {
  25.     var x = xmlDoc.getElementsByTagName('patient'); 
  26.     var theData;
  27.     var row = document.createElement('TR');
  28.  
  29.     for (j=0;j<x[0].childNodes.length;j++)
  30.     {
  31.         if (x[0].childNodes[j].nodeType != 1) continue;
  32.         var container = document.createElement('TH');
  33.  
  34.         if (x[0].childNodes[j].firstChild)
  35.             theData = document.createTextNode(x[0].childNodes[j].firstChild.nodeValue);
  36.         else
  37.             theData = document.createTextNode(' ');
  38.  
  39.         container.appendChild(theData);
  40.         row.appendChild(container);
  41.     }
  42.  
  43.     var container = document.createElement('TH');
  44.  
  45.     theData = document.createElement('A');
  46.     theData.setAttribute('href', url);
  47.     theData.setAttribute('target', '_blank');
  48.  
  49.     theText = document.createTextNode(url);
  50.     theData.appendChild(theText);
  51.     container.appendChild(theData);
  52.     row.appendChild(container);
  53.  
  54.     tmp.appendChild(row);
  55. }
  56.  
  57. var xmlDoc;
  58.  
  59. function explorer_check_directory()
  60. {
  61.     var header = new Array('Date examen',
  62.                             'ID patient             ',
  63.                             'Nom patient                ',
  64.                             'Sexe',
  65.                             'Date naissance',
  66.                             'Age',
  67.                             ' ');
  68.     xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
  69.     xmlDoc.async = false
  70.  
  71.     var newEl = document.createElement('TABLE');
  72.     newEl.setAttribute('border',1);
  73.     var tmp = document.createElement('TBODY');
  74.     newEl.appendChild(tmp);
  75.  
  76.     var row = document.createElement('TR');
  77.     for (j=0;j<7;j++)
  78.     {
  79.         var container = document.createElement('TH');
  80.         var theData = document.createTextNode( header[j] );
  81.         container.appendChild(theData);
  82.         row.appendChild(container);
  83.     }
  84.     tmp.appendChild(row);
  85.  
  86.     for ( var no = 100; no<= max_directory; no++)
  87.     {
  88.         try {
  89.             var url = no +'OLCV1/ExamInfo.xml';
  90.  
  91.             if (xmlDoc.load(url))
  92.                 create_row(tmp, url);
  93.         } catch(e) {
  94.         }
  95.  
  96.     }
  97.  
  98.     document.body.appendChild(newEl);
  99. }
  100.  
  101.  
  102. function check_directory()
  103. {
  104.     var type = -1;
  105.  
  106.     type = check_this_browser();
  107.     if ( 0 == type )
  108.         explorer_check_directory();
  109.     else
  110.         alert('Your browser can\'t handle this script');
  111. }
  112.  
  113.  
  114. -->
  115. </script>
  116.  
  117. <body onload="check_directory()">
  118. </body>
  119. </html>
Nov 23 '15 #1
1 7858
gits
5,390 Expert Mod 4TB
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.
Nov 23 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give...
5
by: Dave Smithz | last post by:
Hi There, I have a PHP script that sends an email with attachment and works great when provided the path to the file to send. However this file needs to be on the same server as the script. ...
7
by: Joseph | last post by:
Hi, I'm having bit of questions on recursive pointer. I have following code that supports upto 8K files but when i do a file like 12K i get a segment fault. I Know it is in this line of code. ...
3
by: StGo | last post by:
How can i read/write file's custom attributs(like subject,author...) in C#??? Thanks :))
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
1
by: Mika M | last post by:
I have made Setup and Deployment Project for my application. This application uses couble of Crysral Report .rpt -files, so I included following into Setup and Deployment Project ... -...
0
by: thjwong | last post by:
I'm using WinXP with Microsoft Visual C++ .NET 69462-006-3405781-18776, Microsoft Development Environment 2003 Version 7.1.3088, Microsoft .NET Framework 1.1 Version 1.1.4322 SP1 Most developers...
17
by: Peter Duniho | last post by:
I searched using Google, on the web and in the newsgroups, and found nothing on this topic. Hopefully that means I just don't understand what I'm supposed to be doing here. :) The problem: ...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
6
by: SUNIL TYATA | last post by:
Once the program goes through the while loop which is checking the file existence like in this code #include<iostream> #include<fstream> using name space std; int main() { read_emails();...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.