Solved

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

Posted on 2009-03-31
2
254 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
  • 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now