Problem. I have several tabs, their contents are loaded via ajax, so the div id of the tab panels is assigned dynamically. I have a form in one, ajaxified this jquery plugin using the callback function associated with the tabs.load event. I pass it one parameter, ui. panels, so ajaxForm () knows the purpose where the result will be loaded:
function initAjaxForms(loadtab)
{
$('form').ajaxForm({target:loadtab, success:initAjaxForms});
}
This works fine, EXCEPT, when I submit the form and PHP returns it as invalid, I can no longer use it (of course, the function is called without the loadtab parameter). the ideal solution would be to have more tab options so that I can do something like this:
function initAjaxForms()
{
var selected = $('tabs').tabs('option', 'selectedpanel');
$('form').ajaxForm({target:selectedpanel, success:initAjaxForms});
}
but this is obviously not the case. Any ideas?