I have worked in the past for corporate clients who are still using IE9. So despite IE and IE9 in particular not being that widespread in the wild, for these intranet systems, my apps must support IE9.
This is not usually a problem, but I do recall a problem occurring in the past which went against what you might expect.
var custRegCodeTextBox = document.getElementById('CustRegCodeTextBox');
var destCustRegCodeTextBox = document.getElementById('DestCustRegCodeTextBox');
destCustRegCodeTextBox.value = custRegCodeTextBox.value;
The solution was to change the code to use jQuery throughout, e.g.:
var custRegCodeTextBox = $('#CustRegCodeTextBox');
var destCustRegCodeTextBox = $('#DestCustRegCodeTextBox');
Why did this work? The best I have to offer are two reasons:
- ASP.NET Webforms will generate id=”Something” name=”Somethingelse” even when ClientIDMode=”Static”. This may have been something to do with it.
- The customer had intranet compatibility mode turned on, and nothing I could do in the page would turn it off.
Anyway, its not very often that using a library solves a problem, usually the opposite is true, if the library introduces a bug, going to the building blocks normally solves it. This just shows to me just how good jQuery really is.