what I what to do is call a form based email routine from the client, I am hoping that by doing it this way I can disable the button used to call the routine imeadiatly so it's only possible to click it 1 time to prevent the same email being send multiple times, and in addtion start a client routine to indicate the email is underway with some graphic of some sort so the use knows that something is happening, all this is because if the attacment is quite large it takes a little while for the procees to complete making it appear that nothing much is happening
If I can could some1 give me a code sample please
You can't call from server-side to client-side and vice-versa. But, you can drop client-side code and trigger server-side events to provide similar functionality.
To keep the click from being firable twice and show a progress indicator add a client-side handler:
onclick="this.disabled=true; window.open('<Animated gif popup URL>','ProgressWindow');"
Keep the same server-side handler to do the email and when you render the page after the postback do: