<script language=”javascript” type=”text/javascript”>
function validateFormOnSubmit(theForm)
{
var reason = “”;
var intFlag = 0;
//Radio button List validation
reason += validateTextBox();
reason += validateLastName();
reason += validateDate();
reason += validateQualification();
reason += validateRadioButtonList();

if(reason != “”)
{
//alert(“Please select Student Status”);
alert(reason);
return false;
}
else
{
return true;
}
/* complete radio list validation */
}

function validateTextBox()
{
var listItemArray = document.getElementById(‘txtFirstName’).value;
var intIsItemChecked = “”;
if(listItemArray.length==0)
{
intIsItemChecked = “First name is required.\n”;
}
return intIsItemChecked;
}

function validateLastName()
{
var listItemArray = document.getElementById(‘txtLastName’).value;
var intIsItemChecked = “”;
if(listItemArray.length==0)
{
intIsItemChecked = “Last name is required.\n”;
}
return intIsItemChecked;
}

function validateDate()
{
var listItemArray = document.getElementById(‘txtBirthDate’).value;
//alert(listItemArray);
var intIsItemChecked = “”;
if(listItemArray.length==0)
{
intIsItemChecked = “Birth date is required.\n”;
}
return intIsItemChecked;
}

function validateQualification()
{
var elementRef = document.getElementById(‘chlEducaionalQualification’);
var listItemArray = elementRef.getElementsByTagName(‘input’);

var intIsItemChecked = “Please select education qualification.\n”;

for (var i=0; i<listItemArray.length; i++)
{
var listItem = listItemArray[i];

if ( listItem.checked )
{
intIsItemChecked = “”;
break;
}
}
return intIsItemChecked;
}

function validateRadioButtonList()
{
var listItemArray = document.getElementsByName(‘rdlStudentStatus’);
var intIsItemChecked = “Please select student status.\n”;

for (var i=0; i<listItemArray.length; i++)
{
var listItem = listItemArray[i];
if ( listItem.checked )
{
intIsItemChecked = “”;
break;
}
}
return intIsItemChecked;
}
</script>

write javascript function name on form’s on submit event..

<form id=”frmStudentEnquiry” runat=”server” onsubmit=”return validateFormOnSubmit(this)>