I have a div (mvc4 razor):
<div onclick='dialogtrigger(this)'>send</div>
when user click on this div it goes to loading a view on popup dialog box and show it to user.
it works fine for the first time that user click it, after that when user close dialog box and want to reopen it again it gives me this error :
0x800a01b6 - JavaScript runtime error: Object doesn't
support property or method 'dialog'
I clean my browser cache and check my script file if it can not support dialog why works for the first time?
my function code:
$.ajax({
url: "OpenSendDialog",
type: "GET",
})
.done(function (result) {
$("#clientdetailmodal").html(result).dialog({
autoOpen: true, modal: true, show: {
effect: "blind",
duration: 500
}
});
});
}
in my main view:
<div id="clientdetailmodal"></div>
and my controller:
[HttpGet]
public ActionResult OpenSendDialog()
{
return view();
}