pop up calendar not reading input offset

zirak

New Member
I have a bit of a problem: when i createtext(RowCol,TableRowCol, sz) only an object is appear on the screen:So can you help me please:\[code\]function createtext(RC, tableRC, sz){var t1= new Array();var i;t1=document.createElement('input');t1.type='text';t1.id=RC;t1.value = http://stackoverflow.com/questions/15526312/tableRC;t1.size = sz;//document.forms[0].appendChild(t1); document.write(t1); //return t1;}var LoadTable = LoadFile(FileName);var Bays = new Array(LoadTable.length);for(var i = 0; i < Bays.length; i++){ Bays = new Array(21);}function DisplayTable(FileName) {for(var row = 0; row <LoadTable.length; row++){ document.write('<tr>'); for(var col = 0; col < LoadTable[row].length; col++) { tableRC = LoadTable[row][col]; var RC = row.toString() +""+ col.toString(); if(col < 3)//single without date { document.write('<td>'); createtext(RC, tableRC, 6);// creates a text node document.write('</td>'); } if(col == 18)//notes at the end { document.write('<td>'); createtext(RC, tableRC, 6);// creates a text node document.write('</br>'); document.write('<button type="button">update!</button></td>'); } if(col == 3)//single with date { document.write('<td>'); createtext(RC, tableRC, 6);// creates a text node document.write('</td>'); } if (col >3 && col < 18)//pair of dates { document.write('<td>'); createtext(RC, tableRC, 6);// creates a text node document.write('</br>'); //col++; RC = row.toString() +""+ col.toString(); tableRC = LoadTable[row][col++]; createtext(RC, tableRC, 6);// creates a text node document.write('</td>'); } }//for(col) document.write('</tr>');}//for(row)}//functon\[/code\]this should create: 3 single testfield. single textfield2 onclick pop up calendar11 pairs textfield2 onclick pop up calendar and a single long textfieldwhen I click on an element TextFIeld2 a pop up calendar should appear. alleast it did whencreatetext(RC, tableRC, sz) had //document.forms[0].appendChild(t1); and was run from a button marked onclick.I have tried to put all my code in but it gets messy.I pressed cntrl k hope it worked okay:many thanks in advancedandyjCnewbie programmer
 
Back
Top