IE9 Issue with dwr.util.addOptions()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

IE9 Issue with dwr.util.addOptions()

pcable
This issue can actually be recreated on your "Map Example" demo4
section of this page:
http://directwebremoting.org/dwr/documentation/browser/util/lists.html

This was working fine in IE 8 and it currently works fine in Firefox.
However when the company upgraded everyone to IE9 the list ordering
broke.

So easiest way to present my problem:

Change the listing in the dwr.util.addOptions("demo4" array as follows:
  {
  4:'Africa',
  2:'America',
  1:'Asia',
  0:'Australasia',
  3:'Europe'
}

Then press the Show Me button.

The list will not display in the order of the Map.  Something is
reordering it to the order of the keys.  

So the dropdown is displaying int he below order:
Australasia,
Asia,
America,
Europe,
Africa

which is not the desired order.

Has anyone else noticed this issue?  There are always ways around this
issue but I did have to change my app to fill the drop down using the
"Advanced OBject Array Example"  method to get the desired ordering.

Thanks,
Pam Cable
Reply | Threaded
Open this post in threaded view
|

Re: IE9 Issue with dwr.util.addOptions()

david@butterdev.com
Pam,
   In the future please post questions to the correct list (http://directwebremoting.org/dwr/support/#users).  You cannot rely on a browsers JavaScript engine to loop through properties of an object in a specific order.  Most browser's engines loop through the properties in the order they were added to the object but that is not a requirement.  If you do a simple search on the internet you can verify this. 

Thanks


On Tue, Apr 16, 2013 at 3:13 PM, <[hidden email]> wrote:
This issue can actually be recreated on your "Map Example" demo4
section of this page:
http://directwebremoting.org/dwr/documentation/browser/util/lists.html

This was working fine in IE 8 and it currently works fine in Firefox.
However when the company upgraded everyone to IE9 the list ordering
broke.

So easiest way to present my problem:

Change the listing in the dwr.util.addOptions("demo4" array as follows:
  {
  4:'Africa',
  2:'America',
  1:'Asia',
  0:'Australasia',
  3:'Europe'
}

Then press the Show Me button.

The list will not display in the order of the Map.  Something is
reordering it to the order of the keys.

So the dropdown is displaying int he below order:
Australasia,
Asia,
America,
Europe,
Africa

which is not the desired order.

Has anyone else noticed this issue?  There are always ways around this
issue but I did have to change my app to fill the drop down using the
"Advanced OBject Array Example"  method to get the desired ordering.

Thanks,
Pam Cable