I am have an issue returning a partial view in a jquery dialog.
The code to call the partial view works and it returns as expected. However, the close button doesn’t seem to work after the call has been made. Visual Studio also has “DisplayPartialFaxEob” underlined with the green squiggly line stating I’m missing “,” or “)”.
This is the code in my View.
providereobDialog.dialog({
modal: true,
autoOpen: false,
draggable: true,
height: 550,
width: 900,
title: 'Provider EOB Details',
resizeable: false,
open: function() {
$(this).load("@Url.Action("DisplayPartialFaxEob", "ProviderEobFax")", function() {
});
},
buttons: {
"Close": function () {
alert('close');
$(this).dialog('close');
}
}
});
This is the code for my Action controller
public ActionResult DisplayPartialFaxEob()
{
//Does some stuff here
return PartialView("_ProviderFaxEob", eob);
}
Any help would be appreciated. Just a FYI that the PartialView is a form that has some basic mvc scaffolding. Thanks
you are missing a closing bracket after “ProviderEobFax”)”
needs to be
Update :
Are the buttons returned in the view? If so any prior jQuery will no longer work as the elements have disappeared and you have all new elements. You will need to rewire the buttons or use the live functionality.
http://api.jquery.com/live/