I'm no pro at javascript either, but I have an idea on how to do it.
Set a div and give it an ID, for example
<div id="waiting"></div>
Add two variables, one for milisecond and the other to add this aspect to your function. So, for instance:
var ms=100;
var somethingVar = setInterval(function() {functionName()}, ms);
Then, what you want to do is in <script>, make a new function that runs on the load of the page (can be done under <head onload="functionName()">). Like so:
function functionName(somethingVar){
}
Inside it, you just gotta make a for loop that changed the innerHTML of your div you set earlier. For instance:
for(var i=0;i<5,i>0;i++)
{
if(i=1){
document.getElementById("waiting").innerHTML = "Waiting";
}
if(i=2){
document.getElementById("waiting").innerHTML = "Waiting.";
}
if(i=3){
document.getElementById("waiting").innerHTML = "Waiting..";
}
if(i=4){
document.getElementById("waiting").innerHTML = "Waiting...";
i=0;
}
}
That's all in terms of waiting. Somebody might have a better idea; likewise, my code might not work, so try and pester a little around it, but you get a general idea of how it should look.