I am sending a query string into NewForm.aspx. I have populated a drop down with that value. Everything works great in Chrome but Internet Explorer does not save the pre-populated value. The value is actually populated on the dropdown list but if I click save, IE acts as if no option was selected. The values I expect do show up in the console. What can I do to make IE recognize that a value has been selected?
$(document).ready(function() {
var queryStringVals = $().SPServices.SPGetQueryString();
var supplierID = queryStringVals["SupplierID"];
console.log(supplierID);
$().SPServices.SPComplexToSimpleDropdown({
columnName: "SupplierID",
});
//like :contains but only selects exact matches
$.expr[':'].textEquals = function(a, i, m) {
return $(a).text().match("^" + m[3] + "$");
};
var selectedSupplierID = $("option:textEquals('" + supplierID + "')").val();
$("select[title=SupplierID]").val(selectedSupplierID);
//No change
//$("select[title=SupplierID]").val(selectedSupplierID).trigger("click");
console.log($("select[title=SupplierID]").val());
//Nope, sigh
//$("option:contains('" + supplierID + "')").attr("selected", "selected");
//tried this before SPComplexToSimpleDropdown
//$("option:textEquals('" + supplierID + "')").val().next("img").trigger("click");
});