Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-03-31
2
Medium Priority
?
264 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 500 total points
ID: 24027145
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

715 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