o***s 发帖数: 31 | 2 这个坛子缺乏助人为乐的优良作风啊,看来还得老朽伸把手,呵呵。
Your javascript code should not embed directly in the html text as it will
be loaded once at page loading time. Rather, you need
to design it as event based. Put your js code in a function like this:
function onButtonClicked()
{
// make please wait div visible
var div = document.getElementById('waitdiv');
div.style.display = 'block';
// make your ajax call, and in the ajax function, set waitdiv display back
to 'none'
ajax.call(...);
return false;
}
And |