Hi,
I have a function in java which is used to generate List of items and display 1st item as default. This is working fine in mozilla and mozilla firefox but whenever try to do this in IE it is discarding 1st element of list and selecting 2nd element of list by default..plz let me know the reason or else am i doing wrong?...
public static String getListItemsInHtml (ListItem[] items,
String ItemSelected, boolean aIsBlankItemRequired){
StringBuffer buffer = new StringBuffer();
if (aIsBlankItemRequired)
buffer.append ("<option value=\"\"> </option>");
if(items != null && items.length > 0) {
String itemValue = null;
for(int i=0; i<items.length; i++) {
itemValue = items[i].getValue();
buffer.append("<option value=\"" + itemValue + "\"");
if (ItemSelected != null && ItemSelected.equals (itemValue)) {
buffer.append(" selected ");
}
buffer.append(">");
buffer.append(items[i].getName());
buffer.append("</option>");
}
}
return buffer.toString();
}