• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

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

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.
1 Solution
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();">
noor21Author Commented:
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

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now