Changeset 368 in tmcsimulator
- Timestamp:
- 04/16/2019 06:03:08 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/webapps/EInotebook/scripts/LoadEvents.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/webapps/EInotebook/scripts/LoadEvents.js
r364 r368 142 142 // MAIN 143 143 console.log("starting LoadEvents"); 144 /** Load the sim script name file and extract the filename of the Incident Script */ 145 loadJSON("../sim_scriptname.json", function(response) 146 { 147 console.log("scriptname file loaded"); 148 try { 149 var scriptnamejson = JSON.parse(response); 150 // For now the script must be located in the EInotebook folder. 151 // It would be better to use the file located in trunk/scripts folder. 152 var scriptFilename = scriptnamejson.filename; 153 console.log("Attempting to load", scriptFilename); 154 // Now load the Incident Script and go parse it 155 loadJSON(scriptFilename, parseXml) 144 try { 145 // the script must be located where accessible by the web server 146 var scriptFilename = "incident_script.xml"; 147 console.log("Attempting to load", scriptFilename); 148 // Now load the Incident Script and go parse it 149 loadJSON(scriptFilename, parseXml) 156 150 157 } catch(e) { 158 console.log("Error attempt to parse sim_scriptname.json: "+response) 159 } 160 }); 151 } catch(e) { 152 console.log("Error attempt to parse incident script "+response) 153 } 161 154 155
Note: See TracChangeset
for help on using the changeset viewer.
