Hi all,
I want to prevent users in ASP .NET 1.1 to click an ImageButton that saves data to a database twice. Ive done it this way (it works really nice):
VB Code:
sJavaScript += "if (typeof(Page_ClientValidate) == 'function') " sJavaScript += "{ if (Page_ClientValidate() == false) " sJavaScript += "{ return false; }" sJavaScript += "} this.src= images\btnInvisible.jpg';" sJavaScript += "this.disabled = true;" sJavaScript += btn.Page.GetPostBackEventReference(btn) & ";" btn.Attributes.Add("onclick", sJavaScript)
The question I have is this one: how can I implement a question if the user wants to save the data? If the user clicks ok, the button should be disabled, if the user clicks cancel, nothing should happen and the button remains clickable.
Could anyone help me with this?
Thanx in advance,
JMvV




Reply With Quote