Changeset 363 in tmcsimulator for trunk/webapps/EInotebook/notebook.js
- Timestamp:
- 04/11/2019 10:35:31 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/webapps/EInotebook/notebook.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/webapps/EInotebook/notebook.js
r359 r363 30 30 function setupNotebook() 31 31 { 32 console.log("setupNotebook() starting"); 32 33 changeTab('summaryTab'); 33 34 showContent('summaryPageContent') … … 138 139 }); 139 140 } 140 // Load the dynamic json file for highways, etc.141 function loadJSON(inFile, callback)142 {143 var xobj = new XMLHttpRequest();144 // Assume XML unless filename ends with .json145 if (inFile.endsWith(".json"))146 {147 xobj.overrideMimeType("application/json");148 }149 xobj.open('GET', inFile, true);150 xobj.onreadystatechange = function()151 {152 if (xobj.readyState == 4 && xobj.status == "200")153 {154 callback(xobj.responseText);155 }156 };157 // We want ajax to ignore any cached responses158 xobj.setRequestHeader('If-Modified-Since', 'Sat, 01 Jan 2000 01:01:01 GMT')159 xobj.send(null);160 }161 141 /** 162 142 * Selects a new tab to be viewed.
Note: See TracChangeset
for help on using the changeset viewer.
