Results 1 to 2 of 2
  1. #1
    vinaydandagi is offline Member
    Join Date
    Jul 2007
    Posts
    1
    Rep Power
    0

    Default want to know IE compatibility with ListItems

    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?...

    Java Code:
      public static String getListItemsInHtml (ListItem[] items, 
                  String ItemSelected, boolean aIsBlankItemRequired){
    
    	StringBuffer buffer = new StringBuffer();
    
    		if (aIsBlankItemRequired)
    	  	buffer.append ("<option value=\"\">&nbsp;</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();
      }
    Last edited by JavaBean; 07-05-2007 at 11:45 AM. Reason: Placed the code inside [code] blocks.

  2. #2
    Heather is offline Senior Member
    Join Date
    Jun 2007
    Posts
    164
    Rep Power
    8

Similar Threads

  1. Compatibility issues with IE7
    By Aneesha in forum New To Java
    Replies: 7
    Last Post: 11-30-2007, 06:46 AM
  2. Replies: 1
    Last Post: 08-09-2007, 08:32 PM
  3. Replies: 2
    Last Post: 07-04-2007, 08:55 AM
  4. Compatibility with Dual Core Procesors
    By dlgoes in forum Advanced Java
    Replies: 1
    Last Post: 05-24-2007, 11:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •