473,287 Members | 1,827 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,287 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 7784
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.