---
title: "Close Modal form"  
description: "Close Modal form"  
author: "Ailsa Singh"  
published: 2017-05-06  
updated: 2017-05-06  
canonical: https://www.mindstick.com/forum/34293/close-modal-form  
category: "asp.net"  
tags: ["asp.net mvc"]  
reading_time: 1 minute  

---

# Close Modal form

Hi

I have below [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) but it is not working. After closing msgmodal i want to [close](https://yourviews.mindstick.com/story/1687/rubbing-hands-close-up-benefits) 'myModal'. Please Help.

```
success: function (result) {                    if (result.success) {                        $("#msgModalBody").html("Record Successfully Saved ?");                        $("#msgModal").modal('show');                        $("#myModal").modal.close();                     }                },
```

Thanks

## Replies

### Reply by Manish Kumar

Your syntax for closing modal is not correct. You can use this

\

```
success: function (result) {            if
(result.success) {                $("#msgModalBody").html("Record Successfully
Saved ?");                $("#msgModal").modal('show');                $("#myModal").modal('hide');//syntax for closing modal            }       
},
```


---

Original Source: https://www.mindstick.com/forum/34293/close-modal-form

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
