Can you set the defaultSelected value of a select field programmaticlly with javascript. My problem is that when checking for values changed by the user I am getting true for the if condition below, when our developers programmaticlly change the selected option. I want them to also update the defaultSelected.
if (thisElement.options[j].selected !=
thisElement.options[j].defaultSelected)
{
dirty = true;
}
Whenever they make
to select a value in drop down, make them also set the defaultSelected attribute of the option inside:
Edit. In Jquery: