Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Java confirm
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Titre:
Divers
Thread ID:
00939118
Message ID:
00939415
Vues:
12
>I have an order system where the user can cancel the order. (This is good) There is a confirmation popup with "Are you sure you want to cancel?" the buttons say "OK" and "Cancel" (This is bad.) since cancel means cancel canceling or keep ordering. How can I get yes and no as text in the confirm popup?

Joe,

Below is the syntax to add the client side code to the button:
btnName.Attributes.Add("onclick", "return confirm('Are you sure you want to cancel?');")
The first parameter is the event to handle and the second parameter is the client-side (javascript) code to execute. If the user clicks cancel on the dialogue then the postback does not occur. In-turn the server side event does not happen.

Hope that helps...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform