I need that when I click on the 'add' button a certain div should be cloned. To achieve this I am using the following code : -
function addDetails()
{
var details=document.getElementById('education');
var eachDetail=document.getElementById('fdetails_edu_div');
var newEduDetail = eachDetail.cloneNode(true);
details.appendChild(newEduDetail);
}//end of addDetails function
so the div named, 'fdetails_edu_div', keeps getting appended to the div named, 'education' every time the 'add' button is clicked.
Now I want to know how can I handle all of these new, dynamically added, divs (that contain text boxes) on the server (using PHP).
The problem is when I view the source of the page, after the add button has been clicked (and consequently, new divs have been appended), I do not see any HTML corresponding to the newly created divs. So I don't understand when the form (containing all these divs) will be posted how will the PHP on the server get access to these newly, dynamically added, textboxes contained in the div ?