How could Firefox know that there's some other valid entry too. There must something wrong out of this snippet. You may post more code, so that its easy to tack the problem.
* Include your code in CODE tags.
Alright, here's some more information. This is the file "tab_switchRefreshForm.jspf":
- <dsp:form formid="tab_switchRefreshForm" id="tab_switchRefreshForm" method="post"
-
action="${originatingRequest.contextPath}/browse/gadgets/moreDetails_display.jsp">
-
<input name="product" type="hidden" value='<dsp:valueof param="product"/>'/>
-
<input name="productId" type="hidden" value='<dsp:valueof param="product.repositoryId"/>'/>
-
<input name="sku" type="hidden" value='<dsp:valueof param="sku"/>'/>
-
Setting hidden input to: <dsp:valueof param="tabname"/>
-
<input name="tabname" type="hidden" value='<dsp:valueof param="tabname"/>' />
-
</dsp:form>
-
-
hidden input set to:<script language="JavaScript"> document.write(document.getElementById("tab_switchRefreshForm").elements.tabname.value);</
-
script><BR/>
Then there is a file which calls it, which I'm showing a simplified version of:
- <div id="moreDetailsTabs">
-
<%@include file="tab_switchRefreshForm.jspf"%>
-
...
-
<dsp:a href="javascript:void(0)" onclick="productTabs.clickTab('features')">
-
</div>
-
...
-
<dsp:a href="javascript:void(0)" onclick="productTabs.clickTab('moreDetails')">
-
...
-
</div>
And finally, the javascript, in its own file (provided using dojo)
- productTabs={
-
-
//called when a user clicks a tab
-
clickTab: function(tabname) {
-
var form = dojo.byId("tab_switchRefreshForm");
-
var currentTab = form.elements.tabname.value;
-
-
-
//If the same tab was clicked as is already showing, do nothing
-
if(currentTab === tabname) {
-
return;
-
}
-
-
//set the new selected tab in the refresh form and submit it
-
-
form.elements.tabname.value = tabname;
-
var thisInstance = productTabs;
-
-
thisInstance.submitRefreshForm();
-
},
-
-
submitRefreshForm: function()
-
{
-
dojo.io.bind({
-
load: function(type, data,evt){
-
var divProductTabs = dojo.byId("moreDetailsTabs");
-
divProductTabs.innerHTML = data;
-
-
dojo.widget.byId('richCart').hijackAllAddToCartNodes();
-
},
-
formNode: dojo.byId("tab_switchRefreshForm")
-
});
-
}
-
};
The functionality I'm getting is it's working fine in IE, but in FF we get some weird errors. It thinks that it is selecting the wrong tab to begin with (The error I initially stated). When you click on a tab for the first time, everything works fine. The page partially refreshes with only the contents of the tabbed area being changed. However, when you click a tab for the second time, the entire area disapears, and is permanently gone.
I realize that this is rather complex, and I perhaps have provided insufficient code still, but more would probably just be too much for people to help me with in their free time :).
Any help?