1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
function render_age(number,tab,parent) {
var restartForm = document.getElementById('restartForm');
var tra = document.createElement('tr');
var tda = document.createElement('td');
tda.setAttribute('height','20');
tda.setAttribute('class','title_rub_table');
var texta = document.createTextNode('Champs'+number);
var trb = document.createElement('tr');
var tdb = document.createElement('td');
tdb.setAttribute('height','2');
tdb.setAttribute('background','/crm/img/barre_inter.gif');
var imga = document.createElement('img');
imga.setAttribute('src','/crm/img/spacer.gif');
imga.setAttribute('width','1');
imga.setAttribute('height','2');
parent.appendChild(tra);
parent.appendChild(trb);
tra.appendChild(tda);
trb.appendChild(tdb);
tda.appendChild(texta);
tdb.appendChild(imga);
var trc = document.createElement('tr');
var tdc = document.createElement('td');
parent.appendChild(trc);
trc.appendChild(tdc);
var selectType = document.createElement('select');
selectType.setAttribute('id','fieldType'+number);
selectType.setAttribute('class','select_menu');
var selName = selectType.getAttribute('id');
selectType.setAttribute('onChange','renderchoice("'+selName+'",'+number+')');
tdc.appendChild(selectType);
var optionType0 = document.createElement('option');
if ('age'=='age') {
optionType0.setAttribute('selected','selected');
}
optionType0.setAttribute('value','age');
var contentType0 = document.createTextNode('age');
optionType0.appendChild(contentType0);
selectType.appendChild(optionType0);
var optionType1 = document.createElement('option');
if ('sexe'=='age') {
optionType1.setAttribute('selected','selected');
}
optionType1.setAttribute('value','sexe');
... |
Partager