--
This is a JavaScript function I wrote to add a line to a DDDW and make it the selected row.
function addItemToDDDW(itemName, dataValue, displayValue)
{
// Add a value to the DDDW
var DDDW_list = document.getElementsByName(itemName);
if (DDDW_list.length > 0)
{
// Add the new row
DDDW_list[0].options[DDDW_list[0].options.length] = new Option(displayValue,
dataValue);
DDDW_list[0].options[DDDW_list[0].options.length - 1].selected = true;
}
}
It would be called like this:
addItemToDDDW('htmlDWFiscalyear', '0', 'No Selection');
Where the first parameter is the JavaScript object name of the DDDW.
--
Jim Egan [TeamSybase]
Thanks Jim
--