Hi,
I got this window that the second time is called a JavaScript error shows “TypeError: Cannot read property ‘refresh’ is undefined’
Please help.
~~~~~~~~~~~~~~~~~~~~ Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@(Html.Kendo().Window().Name("window").Visible(false).Modal(true).Width(1000).Height(700))
<a onclick="verReporte()" class="btn btn-primary">Ver Reporte</a>
function verReporte() { var precinto = $("#ddlPrecinto").val();
var unidad = $("#ddlUnidad").val();
if (unidad == "<Todos>") {
unidad = ''; };
var status = $("#ddlStatus").val();
var category = $("#ddlCategory").val();
var data = { reportname: "VoterList.trdx", parameters: "Precinto=" + precinto + ",Unidad=" + unidad + ",Status=" + status + ",Category=" + category };
var myurl = '@Url.Action("ReportViewerGeneric","Report")';
var mywindow = $("#window").data("kendoWindow");
mywindow.refresh({
url: myurl,
data: data
});
mywindow.title("");
mywindow.center();
mywindow.open();
};
I got this window that the second time is called a JavaScript error shows “TypeError: Cannot read property ‘refresh’ is undefined’
Please help.
~~~~~~~~~~~~~~~~~~~~ Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@(Html.Kendo().Window().Name("window").Visible(false).Modal(true).Width(1000).Height(700))
<a onclick="verReporte()" class="btn btn-primary">Ver Reporte</a>
function verReporte() { var precinto = $("#ddlPrecinto").val();
var unidad = $("#ddlUnidad").val();
if (unidad == "<Todos>") {
unidad = ''; };
var status = $("#ddlStatus").val();
var category = $("#ddlCategory").val();
var data = { reportname: "VoterList.trdx", parameters: "Precinto=" + precinto + ",Unidad=" + unidad + ",Status=" + status + ",Category=" + category };
var myurl = '@Url.Action("ReportViewerGeneric","Report")';
var mywindow = $("#window").data("kendoWindow");
mywindow.refresh({
url: myurl,
data: data
});
mywindow.title("");
mywindow.center();
mywindow.open();
};