View Full Version : menu+image trouble

12-07-2004, 10:18 PM
I'm using this code:

function show(which) {
var m, els, el, i = 0;
if (document.getElementById) {
m = document.getElementById('menu');
els = m.getElementsByTagName('table');
while (el = els.item(i)) {
if (which == i)
el.style.display = (el.style.display != 'block') ? 'block' : 'none';
else el.style.display = "none";
to have a menu toggled, and in the 'menu' element of the page, i have an image named menuimg, and i'm having trouble making the image change source to alternate images, depending on what style the 'table' element has (blocked/none)

please can someone help me