Another Javascript questions - followup

The following code is supposed to prompt the user to fill out the docfield if the Dx field which is a dialog list; is = Other. This does not work. I am not getting an error but I pass validation. Any ideas would be great. Thanks.

function validateFields(){

var frm = document.forms[0];

if (frm.DX.options[frm.DX.selectedIndex].value == “Other” & docfield==“”) {

alert(“Please add data”);

frm.docfield.focus();

return true;

}

}

}

Subject: Another Javascript questions - followup

I’m going to suggest that frm.DX.options[frm.DX.selectedIndex].value is actually “”, since Domino does not create value attributes for options unless you use aliases. Try:

frm.DX.options[frm.DX.selectedIndex].text

instead – it should work.

Subject: Also:

if (frm.DX.options[frm.DX.selectedIndex].value == “Other” & frm.docfield.value == “”) {