Okay, I have a few things I need processed when a user changes a value in a textbox. The only thing is, I need to ask the user if they want to process them when they change the value or not. I was able to add a confirm popup to an onClick event of a button. If the user clicks yes, it continues, if no, it stops. This is exactly what I'm looking for. However, it doesn't seem to be working with the onChange event of the textbox. My Server-side function is being called upon submit, but the Confirm box is not being called. I am probably doing something wrong... Here is my code to add the Confirm Box...
Is this right? Is this even possible to add to the client side event? If not, how would I add a Confirm Box to an OnChange event? Thanks in advance!
Doug
Code:
txtBox.Attributes.Add("onchange","javascript:if(confirm('Would you like to Process?')== false) { window.event.returnValue = false; return false; }");
Is this right? Is this even possible to add to the client side event? If not, how would I add a Confirm Box to an OnChange event? Thanks in advance!
Doug