Forum Moderators: open
This code works in IE6 & 7 & FF but not Safari in windows.
var prod_id = "C1"
if (document.getElementById(prod_id).checked)
alert("1")
else
alert("0")
There is a checkbox, and another link, when i click the link it should alert 0 if the checkbox is not checked and 1 if it is checked.
It works fine in IE6 & 7 & FF but in Safari windows, it always alerts 0.
So what is the way to let it work in Safari too?
Thanks in advance