﻿

function submitform() 
{

    // Get all raw_ text inputs
    var allTextAreas = document.getElementsByTagName('textarea');
    for (i = 0; i < allTextAreas.length; i++) {
        var aDiv = allTextAreas[i];
        var sID = aDiv.id;
        if (sID.indexOf('raw_') == 0) {
            // Set textbox content to the related editable div content (id without leading raw_)
            document.forms["pageContent"].elements[sID].value = document.getElementById(sID.substring(4)).innerHTML; ;
        }
    }

    document.forms["pageContent"].submit();
    //window.forms["pageContent"].submit();
}


