I have to close the SharePoint Model dialog on click of the cancel Button. It worked fine in SharePoint 2010 but same code when i moved to SharePoint 2010 farm then it did not work.
I have searched on google and i got the idea instead of using the above code we have to use some other function. and it was easy in real just a single line of java script.
Above script worked like a charm in SP 2013 and closed the SharePoint Model Dailog.
Below link from where i got the solution.
You will get more explanation why the above script does not work in SharePoint 2013 using the above link.