In HTML, I have some images and a javascript function.
<img onmouseover="repl()" class="EN" ... />
<img onmouseover="repl()" class="FR" ... />
...
When user is on an image. I want to change my header text according to the language selected.
I need a way to have a "reference" to the sender of my function in javascript. But I have no idea because I have not used javascript for years. Please Help me !
function repl() {
// Missing Solution
// var lang = sender.attr("class"); <= Please correct me
var headerText = "";
if (lang == 'FR') {
headerText = "Cliquez sur le drapeau"
} else {
headerText = "Click on flag"
}