I have to toggle the arrow image on onclick event. Here is the code with the required functionility. What I want now is, when the page loads there will be right arrow images. The arrow should be chenge to down arrow when I the row expands to dispaly the child links. and if the collaps to hide child link the arrow should change back to right arroe image. In the below e.g code you will not be able to see the arrow images.
Here is the code I have.
CODE:
[HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled </title>
<script type="text/javascript">
//code for toggling-hide/display table
function ShowMenu(num,me nu,max,imd)
{
//alert('test toggle');
for(i = 0; i < max; i++)
{
//add number onto end of menu
var menu_div = menu + i;
//var menu_div1 = menu1 + i;
//if current show
if(i == num)
{
document.getEle mentById(menu_d iv).style.displ ay = 'inline';
//document.getEle mentById(menu_d iv1).style.disp lay = 'block';
}
else
{
//if not, hide
document.getEle mentById(menu_d iv).style.displ ay = 'none';
//document.getEle mentById(menu_d iv1).style.disp lay = 'none';
}
}
}
</script>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td colspan=3><img src="/virtuals/vap/CWW/images/spacer.gif" height=15 width=1></td>
</tr>
<tr>
<td width=15><img src="/virtuals/vap/CWW/images/spacer.gif" height=1 width=15></td>
<td "width=100% ">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#D DDDDD" width="100%" id="AutoNumber5 " bgcolor=#DDDDDD >
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#1 11111" width="100%" id="AutoNumber6 ">
<tr>
<td width="100%">
<table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#1 11111" id="AutoNumber7 " width="100%">
<tr>
<td valign="top" width="1"></td>
<td><b><font size="2" face="Tahoma" color="black">
<span style="font-size: 8pt">FAVORITE LINKS</span></font></b>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFF F">
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#1 11111" width="100%" id="AutoNumber8 ">
<tr>
<td width ="100%">
<table width="100%" border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse" bordercolor="#1 11111" id="AutoNumber1 0" height="30" >
<tr>
<td width="10%" align ="left" width="" valign="middle" ><a style="cursor:h and" onclick="ShowMe nu('0','row','3 ','img0')"><img id='img0' src="/virtuals/vap/CWW/images/grey_arrow_righ t.jpg" height="13" width="13" alt="right arrow"></a></td>
<td width="100%" valign="top"><f ont style="font-size: 7pt" face="Tahoma">< b>TOP LINKS</b></font></td>
</tr>
<tr id='row0' style="display: none;"><td colspan="2">
<span><table width="100%" border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse">
<tr>
<td width="10%"></td>
<td width="100%" valign="top"><a href="HTTP://expense6.bmc.co m/eworkplace" class="bodyText "><font style="font-size: 8pt" face="Tahoma">E xpense Reports</font></a></td>
</tr>
<tr>
<td width="10%"></td>
<td width="100%" valign="top"><a href="HTTP://sharepoint.bmc. com/GlobalTravel/default.aspx" class="bodyText "><font style="font-size: 8pt" face="Tahoma">T ravel</font></a></td>
</tr>
</table>
</span>
</td>
</tr>
<tr>
<td colspan="2" width="100%">
<hr color="#dddddd" size="1" />
</td>
</tr>
<tr>
<td width="10%" align ="left" width="" valign="middle" ><a style="cursor:h and" onclick="ShowMe nu('1','row','3 ','img1')"><img id='img1' src="/virtuals/vap/CWW/images/grey_arrow_righ t.jpg" height="13" width="13"></a></td>
<td width="100%" valign="top"><f ont style="font-size: 7pt" face="Tahoma">< b>GET IT DONE</b></font></td>
</tr>
<tr id='row1' style="display: none;"><td colspan="2">
<span><table width="100%" border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse">
<tr>
<td width="10%"></td>
<td width="100%" valign="top"><a href="HTTPS://ncai.bmc.com:94 40/OA_HTML/US/OCAIPROD_login. htm" class="bodyText "><font style="font-size: 8pt" face="Tahoma">O racle Login</font></a></td>
</tr>
</table>
</span>
</td>
</tr>
<tr>
<td colspan="2" width="100%">
<hr color="#dddddd" size="1" />
</td>
</tr>
<tr>
<td width="10%" align ="left" width="" valign="middle" ><a style="cursor:h and" onclick="ShowMe nu('2','row','3 ','img2')"><img id='img2' src="/virtuals/vap/CWW/images/grey_arrow_righ t.jpg" height="13" width="13"></a></td>
<td width="100%" valign="top"><f ont style="font-size: 7pt" face="Tahoma">< b>CORPORATE</b></font></td>
</tr>
<tr id='row2' style="display: none;"><td colspan="2">
<span><table width="100%" border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse">
<tr>
<td width="10%"></td>
<td width="100%" valign="top"><a href="HTTP://banana.bmc.com/cgi-bin/calweb/calweb.exe" class="bodyText "><font style="font-size: 8pt" face="Tahoma">C alendar Application</font></a></td>
</tr>
<tr>
<td width="10%"></td>
<td width="100%" valign="top"><a href="HTTP://fishtail.bmc.co m/csg/staging/brandpack/" class="bodyText "><font style="font-size: 8pt" face="Tahoma">E mployee Brand Pack</font></a></td>
</tr>
</table>
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width=15><img src="/virtuals/vap/CWW/images/spacer.gif" height=1 width=15></td>
</tr>
</table>
</body>
</html>[/HTML]