Pop up window details to update parent details

Dear Paul,
Ok it works. So once it sees the same thing I give a pop-up message that is fine right.

Yes, and you can then break out of the loop at the same time too.

Dear Paul,
Thank you. I got one more problem. Where I built table base on ajax calling but when I submit the reference show empty to the table what could be problem? Thank you.

For some reason I’m not understanding what you mean there.

Dear PAul,
I have a piece of code as below. When the alert is shown up it give me null? But the table listOfCorrection is built dynamically based on ajax call.

var table = document.getElementById(“listOfCorrection”);
//var checkbox = table.getElementsByTagName(“input”);
alert(“tableContent:”+table);

Where and when are you alerting that? Or in other words, do you have a test page that can help us to troubleshoot the problem for you? I don’t see it anywhere on your current page.

Dear Paul,
Here is my page http://183.78.169.54/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:

if(clientViolationCorrectionControl.innerHTML="")

Dear Paul,
Thanks that helped. Addition to that I have this codes to check is the checkbox have been checked is this valid?

var table = document.getElementById(“listOfCorrection”);
var checkbox = table.getElementsByTagName(“input”);
alert(“tableContent:”+table);

			for (var i = 0; i < checkbox.length; i++) 
			{			 
			
			   if (checkbox[i].type == "checkbox") 
			   {
			 	  alert("checxbok");
			 	  
			   }
			
			  alert(checkbox[i].checked);
			
			}

Valid has several different confusing meanings. Do you mean to ask if it will be interpreted without fault by the scripting engine?

Dear Paul,
Valid here in a sense whethere I am doing the correct method to check whether checkboxes have been checked or not?

You’ll want to move the second alert inside the if statement, so that it only occurs when it comes across a checkbox.

From there though, how you want to handle things is up to you.