Menu
Hi all,
Ive got a javascript that disable a button while the serverside code is running, this is to prevent multiple clicks (it’s because is a credit card transaction) now I need to change the text of the button from “submit” to “wait” while is disabled.
How do i do that? here’s my code:
<script language=”javascript” type=”text/javascript”>
<!–
function DisableButton() {
document.forms[0].submit();
window.setTimeout(“disableButton(‘” + window.event.srcElement.id + “‘)”, 0);
}
function disableButton(buttonID) {
document.getElementById(buttonID).disabled=true;
}
//–>
</script>
Thanks in advance,
Maurizio