JQuery and IE8 - Form posting on tab change

Posted by Tommy on Stack Overflow See other posts from Stack Overflow or by Tommy
Published on 2010-04-02T13:33:14Z Indexed on 2010/04/02 14:13 UTC
Read the original article Hit count: 311

Filed under:
|

This issue is only happening in IE8 - Firefox 3.5 seems to handle it fine. I have JQuery UI tabs setup on a page. Within each tab is a form that users can do stuff from. I have defined in the select option of the using:

$("#tabs").tabs({select: function(event, ui) {...}});

a submitForm function that submits the form of the tab the user was on previous to changing tabs.

This all works in all browsers. The issue comes in that IE does both the POST of the form on the previous tab and the GET for content of the newly requested tab and or really close to the same time (from what I can tell walking through the debugger). As a result, if a tab is dependent on the form input from another tab, the data is stale - does not match the user input from the previous tab.

How can I either a) force the POST to complete before rendering the next tab or b) force IE to not make the POST and GET for the next tab at the same time?...or c) some other option?

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about asp.net-mvc