Solved

Modal Popup - Do Not Trigger if "Cancel" button is clicked

Posted on 2009-03-31
2
261 Views
Last Modified: 2012-05-06
Hi

I have a ModalPopup on my page which is linked to a command button. The button has a onClientClick event which displays a javascript confirm.

What I am trying to do is that when the js confirm appears it only appears when "OK" is clicked and doesn't appear when "Cancel" is clicked

Any ideas

Thanks
0
Comment
Question by:patelajk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 23

Expert Comment

by:apresto
ID: 24027144
You can do this like this

if ( confirm("Click ok to continue, cancel to return") )
{
    alert("The user clicked OK!");
}
else
{
    alert("The user clicked CANCEL");
}

Open in new window

0
 
LVL 23

Accepted Solution

by:
apresto earned 125 total points
ID: 24027145
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Expression Evaluater 3 46
VS 2015 is giving [No relevant source lines] 2 40
YouTube API get the Video Tags - vb.net 7 33
CSS for Popup in ASP.NET 4 19
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question