How to handle content loading failure in example like this:
qtipTo.qtip({
content: { url: 'EditSchedule'}
action method:
public ActionResult EditSchedule(int? id)
{
if (id.HasValue)
{
var schedule = _fService.GetSingle(id);
if (schedule != null)
{
return View("EditSchedule", schedule);
}else
{
return Content("Unable to load correct data. Maybe the element has been deleted.");
}
}
So basically that’s how it works now, but how can I handle it better? If there is no schedule found, qTip shouldn’t even get opened.
I recommend handling this scenario by using the
onRendermethod and doing an ajax call yourself.Now you can handle any sort of failure in the success callback.