I'm developing a little web app that is used to simply process and store and exchange different data.
When the page loads, I create an javascript array using PHP and use the window.unload function to iterate through this array.
Each element of the array holds a contact id and the loop gets the corresponding row presenting the data (e.g. names, addresses) from another PHP script and appends it to a wrapper div:
for (var i = 0; i < contIDs.length; i++) {
var row = document.createElement("div");
row.className = "rowDiv";
row.innerHTML = HTTPRequest("getRow.php?id=" + contIDs[i]);
document.getElementById("rowsWrapper").appendChild(row);
}
In FireFox the page loads and the rows one by one pop up as supposed. Only Safari loads the page and then loads a while and all rows at once are popped into the DOM.
Can anybody imagine what I'm doing wrong or can anybody give me tips how to implement that kind of "loading animation"??
Thank you, kind regards – julian