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

x
?
Solved

Close Modal Popup OnClick

Posted on 2008-10-26
3
Medium Priority
?
5,493 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
[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
3 Comments
 
LVL 20

Expert Comment

by:Juan_Barrera
ID: 22810339
0
 

Author Comment

by:grogo21
ID: 22813952
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 2000 total points
ID: 22818330
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…

721 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