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);
}
精彩评论