开发者

tabbedpanel - stay on current tab but change content of tab

I have a tabbedpanel with two tabs, when the user clicks submit on the second tab I would like to stay on the current tab but change the content of a tab with a new jsp.

    <td width="100%"><s:tabbedpanel id="test">

        <s:div id="two" label="Search" theme="ajax"
            href="/Search.action">

        </s:div>

        <s:div id="three" label="Add" theme="ajax"
            href="/search.jsp">开发者_运维问答

        </s:div>

    </s:tabbedpanel>

So when the user clicks add within the add tab, user is then redirected to new called confirmation.jsp within the new tab.

Thanks for any help.


Using JQuery will make your life easier, see http://docs.jquery.com/UI/Tabs This example from that page switches to the third tab

var $tabs = $('#example').tabs(); // first tab selected

$('#my-text-link').click(function() { // bind click event to link
    $tabs.tabs('select', 2); // switch to third tab
    return false;
});

Have a look at the page

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜