Skip to content
Snippets Groups Projects
Commit 7b0982f1 authored by Vincent Nivoliers's avatar Vincent Nivoliers
Browse files

fixing non standard innerText

parent af1dfbdb
No related branches found
No related tags found
No related merge requests found
......@@ -21,20 +21,20 @@
href="<?php echo $rootpath?>/css/style.css" />
<!--}}}-->
</head>
<body onload="javascript:Explosurf.explorer.init(
<body>
<div class="hidden" id="planet-file">
<?php
// get the XML planet descriptor
$search = glob("*.xml") ;
$len = count($search) ;
if($len > 0) {
$file = $search[0] ;
echo "'$file'" ;
echo $file ;
} else {
echo "" ;
}
?>
);"
>
</div>
<div class="container">
<!--{{{ top bar-->
<div class="navbar navbar-default">
......
......@@ -127,7 +127,9 @@ function openXML(filename, handler) {
xhttp.addEventListener("error", handle_request_error);
xhttp.addEventListener("readystatechange", function() {handler(this);});
xhttp.open("GET",filename) ;
xhttp.overrideMimeType('text/xml');
if(xhttp.overrideMimeType) {
xhttp.overrideMimeType('text/xml');
}
xhttp.send(null) ;
}
......@@ -260,7 +262,8 @@ function check_boundary(edge) {
/*export*/
Xpl.check_boundary = check_boundary ;
function init(filename) {
function init() {
var filename = document.getElementById('planet-file').innerHTML ;
openXML(filename, function(response) {
if (response.readyState == 4 && response.status == 200) {
load_planet(response.responseXML) ;
......@@ -270,6 +273,7 @@ function init(filename) {
}) ;
}
Xpl.init = init
document.addEventListener("DOMContentLoaded", init) ;
}) //end of namespace
......@@ -196,7 +196,7 @@ document.getElementById('pgm-load-local').addEventListener(
for(var i = 0; i < pgm_list.children.length; ++i) {
var item = pgm_list.children[i] ;
if(item.className.match(/active/)) {
var name = item.children[1].innerText ;
var name = item.children[1].innerHTML ;
local_load('Explosurf:all:pgm:' + name) ;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment