I have a dropdwnlist control on my parent page - ASP.NET C #, when I click the button, a popup window opens to add a new value to the control.
[+]
On the PopUp - Save page, I have the following code:
Response.Write("<script>opener.loadOptionLandlord('" + stid + "','" + strLandlorconn_dbame + "');</script>"); Response.Write("<script>window.close();</script>");
where loadOptionLandlord is a function on my parent page:
function loadOptionLandlord(val,txt) { var opt = document.createElement('<option value="'+ val +'">'); opt.innerText = txt; var sCtrl = document.getElementById('<%= ddlLandlord.ClientID %>'); sCtrl.options[sCtrl.options.length] = new Option(txt, val, false, true); }
The value is saved in the database and the popup closes, but recently added data is not updated in the drop-down list. This works for IE, but not for Chrome.
Please, help..
Lax
source share