Pregunta

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.

¿Fue útil?

Solución

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'); 
    });
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top