I am trying to get the values of a textbox dynamically using an ajax call. I tried to access the source and it shows the textbox exist but it give an error that the textbox value cannot be read
var status, classs;
if(document.getElementById(stud).checked == true){
status = "Checked";
}
else{
status = "Unchecked";
}
var classs = document.getElementById("class_id").value;
var session = document.getElementById("session").value;
var term = document.getElementById("term").value;
it gives the error message on all the last three lines of code saying the class_id, session and term does not exist. I actually created an hidden field to hold different values but yet it complained that it does not exist. Any help will be appreciated. Thanks