I have 2 radio buttons in php file and I want to send values of them to a javascript. When I put same ID name to both radiobuttions, it doesn't work. But javascript only get values using the id. How can I do that?
Code:
php code
--------------
<input name="Gender" id="Gender" type="radio" value="1" /> Male
<input name="Gender" id="Gender" type="radio" value="2" />Female
javascript code
-------------------
var Gender=document.getElementById('Gender').value;
Comment