<div class="rating" onclick="swapImg('bad')"><img id="bad" class="unselected" src="img/unrated.gif"/></div>
my javascript is passing the entire img object into swapImg, and not the string 'bad.' for example, if i console.log(param) the param being passed into swapImg, i get:
<img id="bad" class="unselected" src="img/unrated.gif">
what is happening???
function swapImg(imgId) {
console.log(imgId);
var image = document.getElementById(imgId);
console.log("success2");
}