Tabs within Tabs
Tabs within Tabs
I have an application that has a primary container page with 4 tabs
(default). Within one of those tabs, the loaded page has 2 more tabs
(child1 and child2, for example). The default inner tab (child1) loads
fine the first time, however if the second inner tab (child2) is
clicked, it loads the page it is supposed to load (child2's content)
then immediately loads the parent page (default) inside the second
inner tab. This only occurs in Firefox 2 and 3, and does not occur in
IE7, child1 and child2 load correctly within the inner tabs.
I've tried loading different pages into the child tabs to see if it
was a specific error to the pages being loaded, and no matter which
page it loads, it loads it then immediately loads the default parent
page.
The parent set of tabs is created with this code:
$(document).ready(function(){
$("#content > ul").tabs({
show:function(event){
$("#content > div").height($(window).height()-98);
},
fx: {
opacity:'toggle',
duration:100
},
load:function(ui) {
$('a', ui.panel).click(function() {
$(ui.panel).load(this.href);
return false;
});
},
cookie: { expires: 30 }
});
});
The inner tabs are created with:
$(document).ready(function() {
$("#search-content > ul").tabs({
show:function(event){
$("#search-content > div").height($(window).height()-135);
},
fx: {
opacity:'toggle',
duration:100
},
load:function(ui) {
$('a', ui.panel).click(function() {
$(ui.panel).load(this.href);
return false;
});
}
});
});
The child page containing the two tabs is as follows:
<body>
<div id="search-content">
<ul>
<li><a href="#metapanel"><span>Meta Search</span></a></li>
<li><a href="#textpanel"><span>Text Search</span></a></li>
</ul>
<div id="metapanel">
<iframe src="documentsearch.aspx" height="100%" width="100%"
frameborder="0" />
</div>
<div id="textpanel">
<iframe src="textsearch.aspx" height="100%" width="100%"
frameborder="0" />
</div>
</div>
</body>
I am completely baffled by what is happening and am at the end of my
rope with something that should be extremely simple. Can ANYONE shed
some light on what may be occurring?
-Ryan