I have a link here http://126.96.36.199/v3/addCVC.php. First if you select the name T1 via ajax the second drop down list is populated. Then pick anyvalue from the second drop down list and your will get a table populated below it. Then finally when you press submit button I call the validation function. In there I got this little codes.The alert keep showing me null even though the table is generated with its relevant values too. What is the problem ya?
var table = document.getElementById("listOfCorrection");
//var checkbox = table.getElementsByTagName("input");
Does the table exist in the DOM when you make that call? It looks like when you click the submit button (which is when you get that alert), you're deleting the table from the DOM which would in turn give you null...
I check via the firebug in firefox yes the table is shown to me. So how to make sure the table is not deleted?
Here is my page http://188.8.131.52/v3/addCVC.php. First your select T1 from the first drop down list then the second drop down list will be populated then from the second drop down list you can select any value and you will get a table. This talble is where I reference in the validation function. Thank you.
The reason why you are getting null is because that section of the page no longer exists, so that is no longer any element with the id that you are looking for.
Why does is no longer exist? It's due to this assignment which removes the content:
Thanks that helped.