Hi experts :)
My question is that I would like to have a series of 6 buttons function/animate onclick as per the old cassette recorders, where if PLAY is depressed then all the other buttons not etc.
This is similar to another question that I tried to edit below but didn't do so well so I'll leave it up to you guys:
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_21094478.html?query=image+radio+button&clearTAFilter=trueMy fantastic editing that produced ZERO results :-/
Please help ...
<html>
<head>
<script>
var playOff = "
http://66.197.23.157/media/play.gif"
var playOn = "
http://66.197.23.157/media/play_on.gif"
var stopOff = "
http://66.197.23.157/media/stop.gif"
var stopOn = "
http://66.197.23.157/media/stop_on.gif"
var forwardOff = "
http://66.197.23.157/media/forward.gif"
var forwardOn = "
http://66.197.23.157/media/forward_on.gif"
function swImg(theImg)
{ if (theImg.name == "play")
{ if (theImg.src == playOn)
{ theImg.src = playOff;
} else
{ theImg.src = playOn
document.images['stop'].sr
c = stopOff;
document.images['forward']
.src = forwardOff;
}
} else
{ if (theImg.src == stopOn)
{ theImg.src = stopOff;
} else
{ theImg.src = stopOn;
document.images['play'].sr
c = playOff;
document.images['forward']
.src = forwardOff;
}
}
} else
{ if(theImg.src == forwardOn)
{ theImg.src = forwardOff;
} else
{ theImg.src = forwardOn;
document.images['play'].sr
c = playOff;
document.images['stop'].sr
c = stopOff;
}
}
}
</script>
</head>
<body>
<img src="
http://66.197.23.157/media/play.gif" name="play" onclick="swImg(this)">
<img src="
http://66.197.23.157/media/stop.gif" name="stop" onclick="swImg(this)">
<img src="
http://66.197.23.157/media/forward.gif"na
me="forwar
d" onclick="swImg(this)">
<img src="
http://66.197.23.157/media/rewind.gif" name="rewind" onclick="swImg(this)">
<img src="
http://66.197.23.157/media/pause.gif" name="pause" onclick="swImg(this)">
<img src="
http://66.197.23.157/media/record.gif" name="record" onclick="swImg(this)">
</body>
</html>
Start Free Trial