May be my question was not clear.
I do want the both server and client actions to occur with button click.
The problem is:
When the server side action is alone it occurs.
After I add the OnClientClick attribute, client side action occurs but
server side action stops working.
Bishoy George
bishoy@bishoy.com
0102550399
> 1/u can change the click event to doubleclick event; ----
> client-side
> 2/u can set the buttom enable = false in the onclick event;
> ---server-side
Chineme Nnamdi - 08 May 2006 09:21 GMT
Hi Bishoy,
When you disable an asp button with client script it prevent the server side on click event from firing. What you need to do is to fire the onclick event of the button first before disabling the button. (view snippet below)
<script language="javascript" type="text/javascript">
function Disable()
<%=Page.GetPostBackEventReference(btnSubmit as Control)%>
document.getElementById('<%=btnSubmit.ClientID%>').disabled = true;
}
</script>
Chineme Nnamdi
Technology Development Group
Parkway Projects Limited
7 Olumo street,
Onike, Yaba,
Lagos
Mobile 1: 234 803 9212860
Mobile 2: 234 1 8911807
Office: 234 1 4754362
Email: nchineme@parkwayprojects.com
Website: www.parkwayprojects.com