// prefill validator "direct input" form with basic document structure var text_xhtml1 = '\n\n \n
\n… Your HTML content here …
\n\n '; var text_html401 = '\n\n\n… Your HTML content here …
\n\n'; function prefill_document(textarea_id, doctype) { var txtarea = document.getElementById(textarea_id); // first we remove all children nodes if (doctype == "html401") { txtarea.value = text_html401; } else { txtarea.value = text_xhtml1; } // txtarea.select(); txtarea.focus(); };