Why why why would you code this:
Code:
//<![CDATA[
function showData(oTab)
{
//get the display container
var oContainer = document.getElementById('tab_content');
//get the required data for display
var oDataContainer = document.getElementById(oTab.id + '_content');
//empty the display container;
oContainer.innerHTML = "";
//fill it up
oContainer.innerHTML = oDataContainer.innerHTML;
}
Why copy the contents from a hidden <div> to a visible <div> instead of just changing WHICH <div> is shown and which is hidden????
Because you copy from the hidden div to the visible div, *OF COURSE* you then WIPE OUT whatever was entered before! Because you are copying the *ORIGINAL* contents, again, and they did NOT contain any filled out field!