Thursday, March 18, 2010

Having issues with adding values in drop down when adding options via AJAX in IE only?

Well, in my case this happened because IE and FF/Safari/Chrome treat the option object's constructor [option(arguement-1)] differently.
IE's interpretation = The name of the option is what was passed in arguement-1. The value is null.
FF/Safari/Chrome interpretation = The name of the option is what was in arguement-1. The value is also arguument-1.
So, make sure you pay special attention to this. Since IE does not set the value if 2nd parameter is not passed in, make sure to pass it! It can save you hours!