Hallo
Problem halbschön gelöst:
<div style="width:85%; float:left;">
<ul id="ToDo" type="none" id="ul">
<script type="text/javascript">
var request = null;
request = create("test.xml");
request.onreadystatechange = complete;
request.open("GET", "test.xml", true);
request.send(null);
function create(file){
try{
request = new XMLHttpRequest();
}catch(ex){
try{
request = new ActiveXObject("MSXML2.XMLHTTP");
}catch(ex){
request = new ActiveXObject("Microsoft.XMLHTTP");
}
}
return request;
}
function complete(){
switch (request.readyState){
case 0:
case 1:
case 2:
case 3: return;
case 4: list(request.responseXML); break;
}
list(out);
}
function list(dom){
var liste = dom.getElementsByTagName("task");
var prio = dom.getElementsByTagName("prio");
var listen=null;
for(i=0; i<liste.length; i++){
listen = listen + "<li><div style='float:left; width:80%; vertical-align:bottom'>"
listen = listen + liste[i].childNodes[0].nodeValue;
listen = listen + "</div><div style='float:right; width:20%'><img src='png/"
listen = listen + prio[i].childNodes[0].nodeValue;
listen = listen + ".png' class='img'/></div></li>"
}
document.getElementById("ToDo").innerHTML = listen;
}
</script>
</ul>
</div>
Schöner wäre es das ganze extern zu schreiben und dann einzubinden,
scheint aber nicht so leicht zu funktionieren!
Abschließend noch vielen Dank an ALLE