I am loading 2 jQuery UI tabs with data from ASP.NET MVC 3 PartialView using $.ajax(). I am specifying the '/controller/action' as URL. This works fine and I am able to load the two tabs with content returned by the partial views.
I have a Save button in the _layout.cshtml.On clicking the Save button, I want to get data from all tabs and send it to the controller as a JSON object.I want to use only one Save button for saving all data in the tabs instead of having Save button at the bottom of each tab.
The problem is I am able to get data from only the first tab. I get 'No Source Available' error when I try to get data from the other tab. The $('#some_id').change() event is also not fired for the controls in the second tab.
Please suggest if there is a better way to implement this ?
I would also like to know why the HTML generated by PartialView is not seen when I view source HTML of the page ?
It turned out to be an issue of async requests that were being made to load the tabs. I used the load() of jQuery tabs to resolve this.