drop down value not setting in IE7
Hi , i have a drop down of countries which is coming from database and one country name selected by admin that i m comparing with that drop down list if both values are same that value is selected . So the value is setted in mozilla but in IE its not setting it is giving the first element of countries array
/******* Java code***************/
<html:select property="defaultcountry" styleClass="flatbox" style="width:175px;">
<%
for (int k = 0; k < countries.size(); k=k+2)
{
if((Integer.parseInt(global_settings.get(1).toStri ng())==Integer.parseInt(countries.get(k).toString( )))) {
%>
<option value="<%=countries.get(k)%>"selected"><%=countrie s.get(k+1)%></option>
<%
} else {
%>
<option value="<%=countries.get(k)%>"><%=countries.get(k+1 )%></option>
<%
}
}
%>
</html:select>
Here countries is an array of country ids and names from country table and global_settings.get(1) is an country id selected by admin fetching from other table.
plz any solution??