function create_insert_author(elt) {
var form_input_author = document.createElement('form');
var fieldset_input_author = document.createElement('fieldset');
var table_input_author = document.createElement('table');
var tbody_new = document.createElement('tbody');
var tr_titre = document.createElement('tr');
var td_titre = document.createElement('td');
var titre = document.createTextNode("Saisie d'un nouvel auteur :");
var tr_new = document.createElement('tr');
var td_new = document.createElement('td');
var td_input_author = document.createElement('td');
var text = document.createTextNode("Auteur : ");
var input_author = document.createElement('input');
var tr_new2 = document.createElement('tr');
var td_new2 = document.createElement('td');
var td_new_dates = document.createElement('td');
var text_dates = document.createTextNode("Dates : ");
var tr_new3 = document.createElement('tr');
var td_new3 = document.createElement('td');
var td_new4 = document.createElement('td');
var input_dates = document.createElement('input');
var input_hidden = document.createElement('input');
var input_file = document.createElement('input');
var input_submit = document.createElement('input');
var input_close = document.createElement('input');
var text_download = document.createTextNode("Vous pouvez télécharger ici une photo portrait de l'auteur (au format optimisé gif, png ou jpg");
//attributs
form_input_author.setAttribute("action","?go=biblio&set_author=1");
form_input_author.setAttribute("method","post");
form_input_author.setAttribute("enctype","multipart/form-data");
td_new.setAttribute("width","25%");
input_hidden.setAttribute("type","hidden");
input_hidden.setAttribute("value","10000000");
input_hidden.setAttribute("name","MAX_FILE_SIZE");
input_file.setAttribute("type","file");
input_file.setAttribute("name","userfile");
input_file.setAttribute("enctype","multipart/form-data");
input_submit.setAttribute("id","x");
input_submit.setAttribute("type","submit");
input_submit.setAttribute("value","Envoyer");
input_close.setAttribute("id","x");
input_close.setAttribute("type","button");
input_close.setAttribute("value","Fermer");
input_close.setAttribute("onclick","close_insert_author()");
input_close.onclick = close_insert_author; // pour Internet Explorer
td_new4.setAttribute("colspan","2");
td_new3.setAttribute("width","85%");
//Creation ligne titre
td_titre.appendChild(titre);
tr_titre.appendChild(td_titre);
//Creation ligne saisie Auteur
td_new.appendChild(text);
td_input_author.appendChild(input_author);
tr_new.appendChild(td_new);
tr_new.appendChild(td_input_author);
//Creation ligne saisie Dates
td_new2.appendChild(text_dates);
td_new_dates.appendChild(input_dates);
tr_new2.appendChild(td_new2);
tr_new2.appendChild(td_new_dates);
//Creation ligne telechergement photo
td_new3.appendChild(text_download);
td_new4.appendChild(input_hidden);
td_new4.appendChild(input_file);
tr_new3.appendChild(td_new3);
tr_new3.appendChild(td_new4);
tbody_new.appendChild(tr_titre);
tbody_new.appendChild(tr_new);
tbody_new.appendChild(tr_new2);
tbody_new.appendChild(tr_new3);
table_input_author.appendChild(tbody_new);
fieldset_input_author.appendChild(table_input_author);
fieldset_input_author.appendChild(input_submit);
fieldset_input_author.appendChild(input_close);
form_input_author.appendChild(fieldset_input_author);
var div_insert_author = document.getElementById("div_insert_author");
div_insert_author.appendChild(form_input_author);
elt.parentNode.removeChild(elt);
}
Partager