Click here to edit subtitle


Incompatibility of control events with IE

Posted by [email protected] on April 18, 2013 at 10:05 AM

I was creating a functionality of cloning <div/>, with Jquery .clone() function, which contains multiple html dropdownlist & textboxes controls. Cloning here means like appending new row of controls (Deep copy) . In the div tag I had 2 dropdownlists A & B . Now the population of B happens when I select an item from A. The problem with jquery .clone() function happens in my scenario is of deep copy i.e. it copies the content data , events along with controls. In my development I just wanted the controls & events & avoid data.Though the data doesn't cause any issue with other browsers like Firefox , Chrome as well as Ipad(Safari), still it causes a debacle with IE . The issue is that it does not clears dropdown view when we script 
whereas the same snippet acts fine with other mentioned browsers. The issue is of re-population of dropdown where IE doesn't give proper heed to dropdown selection change event. The new data is populated but the view still shows the old data, to the limits that even the firebug shows the correct data. So to clear old data in IE, we need to use : 

$("#ddlB")[0].options.length = 1;

We can use this snippet in rebinding events for all controls. For detailed scenario you can surf the below mentioned link :
                                                                        Dropdown refresh in IE

Categories: None

Post a Comment


Oops, you forgot something.


The words you entered did not match the given text. Please try again.

Already a member? Sign In


Reply JamosFup
1:30 AM on August 6, 2021 
Reply JamosFup
8:03 AM on July 10, 2021 
You mentioned that wonderfully!