开发者

Dojo tab selection by dynamic href

I want to select a tab programactically by pressing a button. I want to modify href of the tab. I am doing it by onclick=selectTab(param)

    function selectTab(param) {
         var sTab = dojo.widget.byId("sTab");
         sTab.href = 'studiesAjax.action?pid='+ param;
         alert(sTab.href);
         var tabContainer = dojo.widget.byId("tabContainer");

         tabContainer.selectTab("sTab");
       }

But its n开发者_运维技巧ot working. Any thoughts on how i should do it.


Was doing it the wrong way. simply passing on the result of the submit to this div, it (div) is populated with the result. The only thing is to change the tab.

<td align="center">
    <sx:submit type="image" src="images/submit.gif" href="studiesAjax.action?pid=%{patserial}" targets="sTab" onclick="javascript:selectTab('sTab')" value="Studies"  indicator="loadingImage" showLoadingText="false" cssStyle="border: none;"/>
</td>

 

function selectTab(id) {
    var tabContainer = dojo.widget.byId("tabContainer");
    tabContainer.selectTab(id);
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜