confirmation message before updating.

smriti

Regular
Joined
Jan 7, 2005
Messages
54
hi,

I am using image buttons for saving data.
on onclick of image button i need to display confirmation message "Do you want to save data?".This need to be done on client side.
on "ok" i am updating the data.
I wrote confirm message script.It is working, but validations present in the page are not working.
can any one help me to solve this problem.
I need both confirmation message and validations to work.

Thanks
 
Hi

Hi,

The very very simple way is to add a line "btnImage.Attributes.Add("onclick", "checkvalidation()")" in the page load of the code behind page. Declare that function in the client side.

The client side function can be

sub ConfirmDelete()

Response = msgbox("Do you want to save data?", vbYesNo, "Save Data")

if Response = vbNo then
window.event.returnValue =false
end if
end sub

Note: This is very much beginners level code, but will work

smriti said:
hi,

I am using image buttons for saving data.
on onclick of image button i need to display confirmation message "Do you want to save data?".This need to be done on client side.
on "ok" i am updating the data.
I wrote confirm message script.It is working, but validations present in the page are not working.
can any one help me to solve this problem.
I need both confirmation message and validations to work.

Thanks
 
Back
Top