I've got the toggle part of this file down across multiple browsers, but now I'm hoping someone can help me with making each link an image swap onClick.
Here's the code I've got so far:
Code:
<HTML>
 <HEAD>
 <TITLE>toggle foo</TITLE>
 <SCRIPT TYPE="TEXT/JAVASCRIPT" LANGUAGE=JAVASCRIPT>
 <!-- // Hide script from older browsers
 function toggleMenu(currMenu) {
  if (document.getElementById) {
	thisMenu = document.getElementById(currMenu).style; 
  } else if (document.all) {  
	thisMenu = document.all[currMenu].style;
  } else {  
	return true;
  }
   
  if (thisMenu.display == "block") {  
	thisMenu.display = "none"
  } else {  
	thisMenu.display = "block"
  }
   
  return false;
   }
 // End hiding script -->
 </SCRIPT>
 <STYLE TYPE="TEXT/CSS">
 #menu1 {display:none; margin-left:20px}
 #menu2 {display:none; margin-left:20px}
 </STYLE>
 </HEAD>
 <BODY BGCOLOR=WHITE>
 <A HREF="#" onClick="return toggleMenu('menu1')"><img src="image1.gif" height="5" width="5"></A><br>
 <SPAN ID="menu1">
 heres my text to display <BR>
 heres my text to display<BR>
 heres my text to display<BR>
 heres my text to display
 </SPAN>
 <A HREF="#" onClick="return toggleMenu('menu2')"><img src="image1.gif" height="5" width="5"></A><br>
 <SPAN ID="menu2">
 heres my text to display2 <BR>
 heres my text to display2<BR>
 heres my text to display2<BR>
 heres my text to displa2y
 </SPAN>
 </BODY>
 </HTML>
I'd like to be able to swap "image1.gif" with "mage2.gif" at the click but I don't know where to begin with the existing javascript function on the anchor tag. any pointers would be most appreciated.
thanks,
bingy