Solved

Close Modal Popup OnClick

Posted on 2008-10-26
3
5,428 Views
Last Modified: 2012-05-05
Hello, I am using a ajax ModalPopupExtender.  I was wondering how i can hide the modal popup if a user clicks outside the panel (in the grayed out area around the panel).  I have a button on the page which will hide the popup when it is clicked.  How can I call the buttons click event when a user clicks outside the popup using java script?

Thanks
0
Comment
Question by:grogo21
  • 2
3 Comments
 
LVL 20

Expert Comment

by:Juan_Barrera
Comment Utility
0
 

Author Comment

by:grogo21
Comment Utility
Hello,
thanks for the link but I need to close the popup when someone clicks outside of it.  How can i determing when a user clicked outside of the popup so that I can close the popup using javascript provided on that link.

Thanks
0
 
LVL 20

Accepted Solution

by:
Juan_Barrera earned 500 total points
Comment Utility
In that case, I think you'd be better off using PopupControl extender, rather than ModalPopup.
It will, automatically, close when the user clicks outside the window.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 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

12 Experts available now in Live!

Get 1:1 Help Now