I found the solution for the first problem:
var $tabs = $('#tabs').tabs(
 {
         load: function(event, ui) {
                $('a', ui.panel).click(function() {
                    $(ui.panel).load(this.href);
                    return false;
                });

                $("form[name='xxxForm']").ajaxForm(
                {

                    target: ui.panel

                }
}
}

anyone has the solution for the second problem? Thanks in advance.



On Apr 7, 1:32 pm, kpi <threesta...@yahoo.com> wrote:
> Hi,
>
> I am trying to use UI tabs for create tabs for something like this:
> Tab1:Tab2
>
> Here is the problems I came across:
>
> 1. I want to show the struts action reponse in the current tab (let's
> say Tab1). However, the response is shown as a full page in the
> browser.  can someone post sample jQuery code on how to make this
> happen?
>
> 2. If the struts action throws an exception and the struts action form
> validation fails, I want the response (error page/form validation
> errors, etc..) to be shown in the current tab panel. If the struts
> action succeeds, the second tab (Tab2) will be selected and loaded
> with contents.
>   Any sample code for this?
>
> Thanks very much.

Reply via email to