i want my pop up window to close when i press no button

Posted on 2005-04-04
Medium Priority
Last Modified: 2010-04-07
i have a form i created in asp.net page ,when the user click submit there is a pop up window that appears with all the values that the user entered and a no and yes button to confirm the data,i want the window to be closed when the user press the no button,how to do that and is it using java and where to place my code,please explain in details coz i am new to this.
Question by:noor21
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
LVL 26

Accepted Solution

Rejojohny earned 2000 total points
ID: 13695916
what type of button is this "No" button .. If its a web control, change it into a HTML button and add the onclick event in this way
<input id=butNo type = button value = "No" onclick = "javascript:window.close();">

Author Comment

ID: 13697893
Rejojohny i have one more request is it possible to show a message saying are you sure u want to close the window and the yes or no button  instead of  the direct window.close?

Featured Post

Industry Leaders: 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

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…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month8 days, 18 hours left to enroll

764 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