I have this code:
<select>
<option onChange="filterProducts(this);">Select ...</option>
<option onChange="filterProducts(this);">Samsung</option>
<option onChange="filterProducts(this);">LG</option>
<option onChange="filterProducts(this);">Sony</option>
<option onChange="filterProducts(this);">Philips</option>
</select>
Which should fire a js method but it simply does not fire:
function filterProducts(firedByControl){
alert(fired);
}
For this button, calling the same js method, all works nice:
<button type="button" class="btn" onclick="filterProducts(this)" value="LCD">LCD</button>
Can you please tell me where I am wrong?
You need to put the onchange call on the element.