I am working on an application using spring mvc and jquery.

I am getting this error message while selecting another tab and the previous tab is not loaded properly, and only for a fraction of seconds the alert shows up and I am redirected to the requested page.

I have checked the required jquery jtable libraries and everything's getting loaded properly. The capitalization for JSON is also done.

Then where does the problem persist?

Please help me to find out.

有帮助吗?

解决方案

I guess then that it is simple , when you are clicking on one tab, the content is being fetched fro server in the mean time you are clicking on another tab and the previous ajax call could not be completed. So the solution would be to disable all tab clicks while your ajax calls are being processed:

$(".your_Tab_class").removeClass('.class_name_assigned_To_click_event');

When the ajax calls have been completed,re-assign the click events based on class name

  $('.your_Tab_class').each(function(){
          $(this).addClass('.class_name_assigned_To_click_event'); 
    });
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top