Hi all,
i have the following HTML code
<tr>
<td>
<!-- begin: loop(z, 0, [PlayingNowFileCount] - 1) -->
<tr>
<script type="text/javascript">
Load_Tag_info('[PlayingNowFile([z]).FileKey]');
</script>
<td>[PlayingNowFile([z]).FileKey]</td>
<td>
<div id="Info.Name"></div>
</td>
</tr>
<!-- end: loop -->
</td>
</tr>
The script that is called is :
function Load_Tag_info(filekey) {
$.get( "MCWS/v1/File/GetInfo?File=" + filekey +"&Action=MPL", function( data ) {
var xml = $.parseXML(data);
alert(filekey);
// get all items
var items = xml.getElementsByTagName("Field");
if (items != null) {
// loop items
for (var i = 0; i < items.length; i++) {
// parse values
var name = items.getAttribute("Name");
var value = items.childNodes[0].nodeValue;
// get corresponding element
var element = document.getElementById("Info." + name);
if (element != null) {
// update element
if ((element.src != null) && (element.src != "")) {
if (element.src != value)
element.src = value; // image
}
else {
if (element.innerHTML != value)
element.innerHTML = value; // text
}
}
}
}
});
}
Both script and html seem to be working fine however the part <div id="Info.Name"></div> always stays at the same position, and thus overwriting the previous loop results.
any idea's ? in my opinion i am overlooking something but i can not find it
raf