Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DDDW First Item

5 views
Skip to first unread message

Maurizio

unread,
Dec 26, 2007, 2:54:36 AM12/26/07
to
Hi All,
someone could help me with a bit of sample for mark the first item on
DDDW on web datawindow like <option selected> ...
Thanks
Maurizio

--

Jim Egan

unread,
Dec 31, 2007, 9:23:49 PM12/31/07
to
m...@nsit.it wrote...

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]

Maurizio

unread,
Jan 2, 2008, 5:29:54 AM1/2/08
to
Jim Egan wrote:

Thanks Jim

--

0 new messages