<input type="button" name="Next" id="Next" value="Next" onclick="showNextQuest(<?php echo $_POST ['$qtnid']; ?>)" />
$qtnid is the name of a radio button, i used the post method to know which one among the radio buttons is selected. The radio button has the same name with different values.It return an undefined error when itried to use alert function inside the showNextQuest function in the javascript. plz help me out.