want to know IE compatibility with ListItems

Hi,

I have written below function in my java file which Generates List Of Items used for Drop Down List in HTML. Also selects a default value if present. It is working fine with mozilla and mozilla firefox browsers but don't know why it is discarding first element of drop down list in Internet explorer..? in IE it selecting 2nd element by default discrading first element from the list....Is it IE compatibility issue or am I doing wrong..?

Let me know plz.

public static String getListItemsInHtml (ListItem[] aListItems, String aSelectedItem, boolean aIsBlankItemRequired){

StringBuffer buffer = new StringBuffer();

if (aIsBlankItemRequired)

buffer.append ("<option value=\"\"> </option>");

if(aListItems != null && aListItems.length > 0) {

String itemValue = null;

for(int i=0; i<aListItems.length; i++) {

itemValue = aListItems.getValue();

buffer.append("><option value=\"" + itemValue + "\"");

if (aSelectedItem != null && aSelectedItem.equals (itemValue)) {

buffer.append(" selected ");

}

buffer.append(">");

buffer.append(aListItems.getName());

buffer.append("</option>");

}

}

return buffer.toString();

}

[1314 byte] By [vinaydandagia] at [2007-11-27 9:39:18]
# 1
This is a Java forum and though people here may be users of HTML you might do better to address this to a Microsoft IE forum.
sabre150a at 2007-7-12 23:14:20 > top of Java-index,Java Essentials,Java Programming...