Using KendoUI to display a popup window, I've noticed that if I reuse an existing window by calling refresh
it briefly displays the old content until the AJAX request completes.
My code:
function clickHandler(evt) {
evt.preventDefault();
var dta=this.dataItem($(evt.currentTarget).closest("tr"));
convertWindow.refresh({ type: "GET", url: "CallMeConvert?AppointmentId="+dta.AppointmentId});
convertWindow.center();
convertWindow.open();
}
Is there any way to prevent this happening, or must I destroy and recreate the window every time?
It was, in the end, quite simple. You just need to clear the HTML immediately before doing the reset, like so:
$("#convert-window").html("");
convertWindow.refresh({ type:"GET", url:url }).center().open();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With