In your client validation script, add the following if the validation
fails. window.event.returnValue =3D false;
This should cancel the click event on a submit button in IE
-----Original Message-----
From: DT-Rene Vazquez [mailto:renevazquez@c...]
Sent: 11. november 2002 09:16
To: ASPX_Professional
Subject: [aspx_professional] cancel click event
Hi! All, I have a page in which the user updates data and submit changes
to the server. I make some processing in IE before I send the data to
the server. I send the data to the server with the click of a button web
form server control. What I want to do is that if some validation that I
make return false, then don't submit the form and stay in the page. But
since I have programmed the server side code in the button on_click
event, the code in the event handler executes anyway. Is there some way
to avoid that the click event in the server occurs based on some client
side circumstances. Another situation that makes sense for my question
is when I want to ask the user whether to write the changes or cancel
with an alert box asking to click ok to proceed or cancel to quit.
Thanks a lot for any help!