Forum Moderators: open
This is what I have:
var oCellScr = newRow.insertCell();
var oscr = document.createElement('script');
oscr.name = 'PROJ_DELIVERY';
oCellScr.appendChild(oscr);
The HTML tag holds this:
<td><script>DateInput('PROJ_DELIVERY', true, 'DD-MON-YYYY')</script></td>
The table is set up as a grid and dynamic input rows are added with the addrow() function. Not sure how to code document.createElement for a SCRIPT tag.
Thanks!
Technically, you don't need to (and can't and shouldn't) add the script element itself on the fly. Instead, simply assign the output of a
DateInput('PROJ_DELIVERY', true, 'DD-MON-YYYY') function call to the table cell's innerHTML. [edited by: DrDoc at 5:09 am (utc) on Oct. 8, 2006]
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' maxLength=10 value='' name='PROJ_DELIVERY'>";
What would be the syntax to include DateInput('ORDER_DATE', true, 'DD-MON-YYYY') without my dynamic row function ( addrow() ) not being overridden?
Thanks!