PDA

View Full Version : Problem in tab panel



2009old
Feb 4th, 2010, 05:42 PM
I dont know where should I put that content it has all javascript and css ...javascript is working fine but some problem with css


<script type="text/javascript" language="JavaScript"><!--
function ManageTabPanelDisplay() {

var idlist = new Array('tab1focus','tab2focus','tab3focus','tab4focus','tab1ready','tab2ready','tab3ready','tab4ready ','content1','content2','content3','content4');


if(arguments.length < 1) { return; }
for(var i = 0; i < idlist.length; i++) {
var block = false;
for(var ii = 0; ii < arguments.length; ii++) {
if(idlist[i] == arguments[ii]) {
block = true;
break;
}
}
if(block) { document.getElementById(idlist[i]).style.display = "block"; }
else { document.getElementById(idlist[i]).style.display = "none"; }
}
}
//--></script>



<style type="text/css">
.tab {
font-family: verdana,sans-serif;
font-size: 12px;
width: 100px;
height:30px;
white-space: nowrap;
text-align: center;
border-style: solid;
border-color: #9a9a9a;
border-left-width: 1px;
border-right-width: 1px;
border-top-width: 1px;
border-bottom-width: 0px;
padding-top: 5px;
padding-bottom: 5px;
padding-left:3px;
padding-right:3px;
cursor: pointer;

}
.tabhold {
background-color:#9a9a9a; /*color of menu #666666*/
color: white;
}
.tabfocus {
background-color:white;
color: #666666;
}
.tabcontent {
font-family: sans-serif;
font-size: 12px;
height: 320px;
border-style: solid;
border-color: #9a9a9a;
border-width: 1px;
padding-top: 15px;
padding-left: 10px;
padding-right: 10px;
overflow-y:scroll;overflow:-moz-scrollbars-vertical;
}
</style>


<table border="0" cellpadding="0" cellspacing="0" >
<tr >
<td>
<div id="tab1focus" class="tab tabfocus" style="display:block; padding-top:10px; height:39px;" >

Overview
</div>
<div id="tab1ready" class="tab tabhold" style="display:none; padding-top:10px;height:39px;">

<span onclick="ManageTabPanelDisplay('tab1focus','tab2ready','tab3ready','tab4ready','content1')" >Overview
</span>
</div>
</td><td > </td><td>
<div id="tab2focus" class="tab tabfocus" style="display:none;">
Dimensions <br />
& Details
</div>
<div id="tab2ready" class="tab tabhold" style="display:block;">

<span onclick="ManageTabPanelDisplay('tab1ready','tab2focus','tab3ready','tab4ready','content2')">Dimensions <br />
& Details</span>
</div>
</td><td > </td><td>
<div id="tab3focus" class="tab tabfocus" style="display:none;">
Quantity <br />
& Constructions
</div>
<div id="tab3ready" class="tab tabhold" style="display:block;">
<span onclick="ManageTabPanelDisplay('tab1ready','tab2ready','tab3focus','tab4ready','content3')">Quantity <br />
& Constructions</span>
</div>
</td>
<td > </td><td>
<div id="tab4focus" class="tab tabfocus" style="display:none;">
Customization <br />
Options
</div>
<div id="tab4ready" class="tab tabhold" style="display:block;">
<span onclick="ManageTabPanelDisplay('tab1ready','tab2ready','tab3ready','tab4focus','content4')">Customization <br />
Options
</span>
</div>
</td>
<td width="100%"> </td><td>
</tr>
<tr >
<td colspan="8" >
<div id="content1" class="tabcontent" style="display:block;">
Content1
</div>
<div id="content2" class="tabcontent" style="display:none;">
Content2
</div>
<div id="content3" class="tabcontent" style="display:none;">
Content3
</div>
<div id="content4" class="tabcontent" style="display:none;">
Content4
</div>
</td></tr>
</table>

2009old
Feb 4th, 2010, 05:45 PM
put these all together in one file will display a tab panel ...

Running fine in IE but tab problem in mozilla .....


Thanks in advance

2009old
Feb 4th, 2010, 06:04 PM
For help I m putting it all together ..copy and paste and run ... I used 2 browsers IE and mozilla... you fill find the problem ...I know some one will definatly solve my problem .....


<script type="text/javascript" language="JavaScript"><!--
function ManageTabPanelDisplay() {

var idlist = new Array('tab1focus','tab2focus','tab3focus','tab4focus','tab1ready','tab2ready','tab3ready','tab4ready ','content1','content2','content3','content4');


if(arguments.length < 1) { return; }
for(var i = 0; i < idlist.length; i++) {
var block = false;
for(var ii = 0; ii < arguments.length; ii++) {
if(idlist[i] == arguments[ii]) {
block = true;
break;
}
}
if(block) { document.getElementById(idlist[i]).style.display = "block"; }
else { document.getElementById(idlist[i]).style.display = "none"; }
}
}
//--></script>

<style type="text/css">
.tab {
font-family: verdana,sans-serif;
font-size: 12px;
width: 100px;
height:30px;
white-space: nowrap;
text-align: center;
border-style: solid;
border-color: #9a9a9a;
border-left-width: 1px;
border-right-width: 1px;
border-top-width: 1px;
border-bottom-width: 0px;
padding-top: 5px;
padding-bottom: 5px;
padding-left:3px;
padding-right:3px;
cursor: pointer;

}
.tabhold {
background-color:#9a9a9a; /*color of menu #666666*/
color: white;
}
.tabfocus {
background-color:white;
color: #666666;
}
.tabcontent {
font-family: sans-serif;
font-size: 12px;
height: 320px;
border-style: solid;
border-color: #9a9a9a;
border-width: 1px;
padding-top: 15px;
padding-left: 10px;
padding-right: 10px;
overflow-y:scroll;overflow:-moz-scrollbars-vertical;
}
</style>

<table border="0" cellpadding="0" cellspacing="0" >
<tr >
<td>
<div id="tab1focus" class="tab tabfocus" style="display:block; padding-top:10px; height:39px;" >

Overview
</div>
<div id="tab1ready" class="tab tabhold" style="display:none; padding-top:10px;height:39px;">

<span onclick="ManageTabPanelDisplay('tab1focus','tab2ready','tab3ready','tab4ready','content1')" >Overview
</span>
</div>
</td><td > </td><td>
<div id="tab2focus" class="tab tabfocus" style="display:none;">
Dimensions <br />
& Details
</div>
<div id="tab2ready" class="tab tabhold" style="display:block;">

<span onclick="ManageTabPanelDisplay('tab1ready','tab2focus','tab3ready','tab4ready','content2')">Dimensions <br />
& Details</span>
</div>
</td><td > </td><td>
<div id="tab3focus" class="tab tabfocus" style="display:none;">
Quantity <br />
& Constructions
</div>
<div id="tab3ready" class="tab tabhold" style="display:block;">
<span onclick="ManageTabPanelDisplay('tab1ready','tab2ready','tab3focus','tab4ready','content3')">Quantity <br />
& Constructions</span>
</div>
</td>
<td > </td><td>
<div id="tab4focus" class="tab tabfocus" style="display:none;">
Customization <br />
Options
</div>
<div id="tab4ready" class="tab tabhold" style="display:block;">
<span onclick="ManageTabPanelDisplay('tab1ready','tab2ready','tab3ready','tab4focus','content4')">Customization <br />
Options
</span>
</div>
</td>
<td width="100%"> </td><td>
</tr>
<tr >
<td colspan="8" >
<div id="content1" class="tabcontent" style="display:block;">
content1
</div>
<div id="content2" class="tabcontent" style="display:none;">
content2
</div>
<div id="content3" class="tabcontent" style="display:none;">
content3
</div>
<div id="content4" class="tabcontent" style="display:none;">
content4
</div>
</td></tr>
</table>



thanks

2009old
Feb 4th, 2010, 10:47 PM
completely stuck , but done something which is somehow showing proper ..change something to just show IE other wise mozilla ....:confused:


<div id="tab1focus" style="font-family: verdana,sans-serif;
font-size: 12px;
width: 100px;
*height: 39px;
white-space: nowrap;
text-align: center;
border-style: solid;
border-color: #9a9a9a;
border-left-width: 1px;
border-right-width: 1px;
border-top-width: 1px;
border-bottom-width: 0px;
padding-top: 13px;
padding-bottom: 12px;
*padding-top: 10px;
*padding-bottom: 10px;
padding-left:3px;
padding-right:3px;
cursor: pointer;background-color:white;
color: #666666;" >

Overview
</div>
<div id="tab1ready" style="display:none;font-family: verdana,sans-serif;
font-size: 12px;
width: 100px;
*height: 39px;
white-space: nowrap;
text-align: center;
border-style: solid;
border-color: #9a9a9a;
border-left-width: 1px;
border-right-width: 1px;
border-top-width: 1px;
border-bottom-width: 0px;
padding-top: 13px;
padding-bottom: 12px;
*padding-top: 10px;
*padding-bottom: 10px;
padding-left:3px;
padding-right:3px;
cursor: pointer;background-color:#9a9a9a;
color:white;">

<span onclick="ManageTabPanelDisplay('tab1focus','tab2ready','tab3ready','tab4ready','content1')" >Overview
</span>
</div>

Avril
Feb 5th, 2010, 04:22 PM
All your css and javascript should go between the <head> </head> tags, and the html between the <body> </body> tags.

Try this:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
<html>

<head>
<title></title>

<script type="text/javascript" language="JavaScript">

<!--
function ManageTabPanelDisplay() {

var idlist = new Array('tab1focus','tab2focus','tab3focus','tab4focus','tab1ready','tab2ready','tab3ready','tab4ready ','content1','content2','content3','content4');


if(arguments.length < 1) { return; }
for(var i = 0; i < idlist.length; i++) {
var block = false;
for(var ii = 0; ii < arguments.length; ii++) {
if(idlist[i] == arguments[ii]) {
block = true;
break;
}
}
if(block) { document.getElementById(idlist[i]).style.display = "block"; }
else { document.getElementById(idlist[i]).style.display = "none"; }
}
}
//--></script>

<style type="text/css">
.tab {
font-family: verdana,sans-serif;
font-size: 12px;
width: 100px;
height:30px;
white-space: nowrap;
text-align: center;
border-style: solid;
border-color: #9a9a9a;
border-left-width: 1px;
border-right-width: 1px;
border-top-width: 1px;
border-bottom-width: 0px;
padding-top: 5px;
padding-bottom: 5px;
padding-left:3px;
padding-right:3px;
cursor: pointer;

}
.tabhold {
background-color:#9a9a9a; /*color of menu #666666*/
color: white;
}
.tabfocus {
background-color:white;
color: #666666;
}
.tabcontent {
font-family: sans-serif;
font-size: 12px;
height: 320px;
border-style: solid;
border-color: #9a9a9a;
border-width: 1px;
padding-top: 15px;
padding-left: 10px;
padding-right: 10px;
overflow-y:scroll;overflow:-moz-scrollbars-vertical;
}
</style>

</head>

<body>
<table border="0" cellpadding="0" cellspacing="0" >
<tr >
<td>
<div id="tab1focus" class="tab tabfocus" style="display:block; padding-top:10px; height:39px;" >

Overview
</div>

<div id="tab1ready" class="tab tabhold" style="display:none; padding-top:10px; height:39px;">
<span onclick="ManageTabPanelDisplay('tab1focus','tab2ready','tab3ready','tab4ready','content1')" >
Overview
</span>

</div>
</td><td > </td><td>

<div id="tab2focus" class="tab tabfocus" style="display:none;">
Dimensions <br>
& Details
</div>

<div id="tab2ready" class="tab tabhold" style="display:block;">
<span onclick="ManageTabPanelDisplay('tab1ready','tab2focus','tab3ready','tab4ready','content2')">Dimensions <br>
& Details</span>
</div>

</td><td > </td><td>
<div id="tab3focus" class="tab tabfocus" style="display:none;">
Quantity <br />
& Constructions
</div>
<div id="tab3ready" class="tab tabhold" style="display:block;">
<span onclick="ManageTabPanelDisplay('tab1ready','tab2ready','tab3focus','tab4ready','content3')">Quantity <br />
& Constructions</span>
</div>
</td>
<td > </td><td>
<div id="tab4focus" class="tab tabfocus" style="display:none;">
Customization <br />
Options
</div>
<div id="tab4ready" class="tab tabhold" style="display:block;">
<span onclick="ManageTabPanelDisplay('tab1ready','tab2ready','tab3ready','tab4focus','content4')">Customization <br />
Options
</span>
</div>
</td>
<td width="100%"> </td><td>
</tr>
<tr >
<td colspan="8" >
<div id="content1" class="tabcontent" style="display:block;">
content1
</div>
<div id="content2" class="tabcontent" style="display:none;">
content2
</div>
<div id="content3" class="tabcontent" style="display:none;">
content3
</div>
<div id="content4" class="tabcontent" style="display:none;">
content4
</div>
</td></tr>
</table>

</body>
</html>

2009old
Feb 5th, 2010, 04:53 PM
http://www.sfosite.com/monzocollectionextradeepextraplushsofamakeasectionalpickyourfabriccolor-p-3667.html?cPath=93_126_190&osCsid=461cfea174aa97729f67ca8155c23cc2?cPath=93_126_190&osCsid=461cfea174aa97729f67ca8155c23cc2

I think U still did not understand the problm ...see that url

thanks a lot for reply :)