Hi there,
I have a table with retracting cols, but withing the td's there are some select tags, and when clicked they fire up my onClick event from a completely different table
code snippet >>>
<HTML>
<HEAD><TITLE></TITLE>
<script type="text/javascript">
function expandIt {
im_0 = document.getElementById("im_" + y);
frank = new Array(4) ;
for (i = 0; i <= 4; i++) {
frank = document.getElementById(y + "_" + i);
if (frank) {
if (frank.className == 'retract') {
frank.className = 'xpand';
im_0.src = "../images/minus.gif";
} else {
frank.className = 'retract';
im_0.src = "../images/plus.gif";
}
}
}
}
</script>
<STYLE>
.i_click{cursor ointer;}
.xpand { visibility:visible;}
.retract{ visibility:collapse;}
</STYLE>
</HEAD>
<BODY>
<TABLE border="1">
<TR><TD><IMG src="../images/plus.gif" class="i_click" id="im_x" onClick="javascript:expandIt('x');"/></TD>
<TD>Column 2</TD></TR>
<TR><TD><IMG src="../images/plus.gif" class="i_click" id="im_y" onClick="javascript:expandIt('y');"/></TD>
<TD>Column 3</TD></TR>
</TABLE>
<TABLE border="1">
<TH>Heading 1</TH>
<TH>Heading 2</TH>
<TH>Heading 3</TH>
<TH>Heading 4</TH>
<TH>Heading 5</TH>
<TH>Heading 6</TH>
<TH>Heading 7</TH>
<col style="background-color: #6374AB; color: #ffffff" />
<col id="x_0" span="1" class="retract" style="background-color: #07B133; color: #ffffff;" />
<col id="x_1" span="1" class="retract" style="background-color: #CACACA; color: #ffffff;" />
<col id="x_2" span="1" class="retract" style="background-color: #CACACA; color: #ffffff;" />
<col id="y_1" span="1" class="retract" style="background-color: #CACACA; color: #ffffff;" />
<col id="y_2" span="1" class="retract" style="background-color: #CACACA; color: #ffffff;" />
<col style="background-color:yellow;"/>
<TR><TD>Col 1 Row 1</TD>
<TD>Col 2 Row 1</TD>
<TD>Col 3 Row 1</TD>
<TD><SELECT id="test" name="test"><OPTION>1</OPTION><OPTION>2</OPTION><OPTION>3</OPTION></SELECT></TD>
<TD>Col 5 Row 1</TD>
<TD>Col 6 Row 1</TD>
<TD>Col 7 Row 1</TD></TR>
</TABLE>
</BODY>
</HTML>
<<<
I have a table with retracting cols, but withing the td's there are some select tags, and when clicked they fire up my onClick event from a completely different table
code snippet >>>
<HTML>
<HEAD><TITLE></TITLE>
<script type="text/javascript">
function expandIt {
im_0 = document.getElementById("im_" + y);
frank = new Array(4) ;
for (i = 0; i <= 4; i++) {
frank = document.getElementById(y + "_" + i);
if (frank) {
if (frank.className == 'retract') {
frank.className = 'xpand';
im_0.src = "../images/minus.gif";
} else {
frank.className = 'retract';
im_0.src = "../images/plus.gif";
}
}
}
}
</script>
<STYLE>
.i_click{cursor ointer;}
.xpand { visibility:visible;}
.retract{ visibility:collapse;}
</STYLE>
</HEAD>
<BODY>
<TABLE border="1">
<TR><TD><IMG src="../images/plus.gif" class="i_click" id="im_x" onClick="javascript:expandIt('x');"/></TD>
<TD>Column 2</TD></TR>
<TR><TD><IMG src="../images/plus.gif" class="i_click" id="im_y" onClick="javascript:expandIt('y');"/></TD>
<TD>Column 3</TD></TR>
</TABLE>
<TABLE border="1">
<TH>Heading 1</TH>
<TH>Heading 2</TH>
<TH>Heading 3</TH>
<TH>Heading 4</TH>
<TH>Heading 5</TH>
<TH>Heading 6</TH>
<TH>Heading 7</TH>
<col style="background-color: #6374AB; color: #ffffff" />
<col id="x_0" span="1" class="retract" style="background-color: #07B133; color: #ffffff;" />
<col id="x_1" span="1" class="retract" style="background-color: #CACACA; color: #ffffff;" />
<col id="x_2" span="1" class="retract" style="background-color: #CACACA; color: #ffffff;" />
<col id="y_1" span="1" class="retract" style="background-color: #CACACA; color: #ffffff;" />
<col id="y_2" span="1" class="retract" style="background-color: #CACACA; color: #ffffff;" />
<col style="background-color:yellow;"/>
<TR><TD>Col 1 Row 1</TD>
<TD>Col 2 Row 1</TD>
<TD>Col 3 Row 1</TD>
<TD><SELECT id="test" name="test"><OPTION>1</OPTION><OPTION>2</OPTION><OPTION>3</OPTION></SELECT></TD>
<TD>Col 5 Row 1</TD>
<TD>Col 6 Row 1</TD>
<TD>Col 7 Row 1</TD></TR>
</TABLE>
</BODY>
</HTML>
<<<