I have a drodown box in my html form. I want when "0" is selected from the dropdown then the form should be reset otherwise make the ajax call to fill the form. I have written the following code for that purpose, but it is not working, I mean the form fields are not being reset.
$("select#student_id").change(function(){
var student = $(this).val;
if(student!=0)
{
//Here I make the ajax call to populate the form
}
Here how can I reset the form fields.