Urgent : Combobox Data issue

Hi

I have a combobox(StatusPerson) in which, populating users name from names.nsf database using below code :

OnLoad of the form ::: dbLookup1(serv,“names.nsf”,viewnameadd,keyVal,3,ObjStatusReportFor);

Function :::

function writeInComboSR(data,fldCombo)

{

fldCombo.length=0

fldCombo.length +=1

fldCombo[fldCombo.length-1].text = "Choose a Person for this Status Report"

for(iCount=1;iCount<data.length;iCount++)

{

	fldCombo.length +=1

	strText =new Object();

	strText=data[iCount]

	var pos = strText.indexOf('/O=');

	strText = strText.substring(0,pos);

	if (strText !=undefined && strText != null)

	{

	fldCombo[fldCombo.length-1].text = trim(strText)

	}

}	

}

I need to display login users name in the StatusPerson(Combobox) however it is showing the first row “Choose a Person for this Status Report”.

Kindly advise.

Thanks,

Sanjay

Subject: Urgent : Combobox Data issue

Hi All

Thanks a lot to all of you for keeping patient for my combo box problem. It has been resolved.

add below lines in the function.

if(strText == document.forms[0].CurrUser.value)

{

fldCombo[fldCombo.length-1].text = trim(strText)

fldCombo[fldCombo.length-1].selected= true

}

else

{

fldCombo[fldCombo.length-1].text = trim(strText)

}

Thanks

Sanjay