[Javascript] Disabling the image submit button -- aspx

Guy Platt guy at webbnet.com
Thu Nov 13 08:00:14 CST 2003


Hi,

I'm working with an aspx  imagebutton and want to disable the button 
after it has been clicked once. I have the following (not working) code.

Anyone got experience with aspx  imagebuttons?

many thanks
   Guy



<script LANGUAGE="JavaScript">
// var submitted=false
function submitonce(theform)
{    
   //  if(submitted){return false}
     var ProceedButton = document.getElementById('ImageButton1')
     ProceedButton.disabled = true;
     //submitted=true;
     return (true);
}
</script>
</HEAD>

<body>
        <form id="billing" method="post" runat="server"  
onSubmit="return submitonce(this)">

.
.
.
<asp:ImageButton Runat='server' ImageUrl="../images/fortsatt.gif" 
OnClick='SubmitForm' id='ImageButton1' />





More information about the Javascript mailing list