Can I use indexOf(input)?
<pre><code>function myFunction(input){
var number_of_images = input.parentNode.getElementsByTagName("img")
var image_clicked = number_of_images.indexOf(input)
alert ("you clicked on image number "+image_clicked)
}
</code></pre>

<p>I am building a rating scale with three images. I want to communicate the user which of the three images he´s clicked on. I have onClick events on all three images onClick(this). Then, I am trying to use indexOf(input), where input is refers to the parameter (this) passed from an onclick(this). It´s not working. ¿Any alternative suggested? Thanks.</p>
