ASP.NET & Javascript: Setting values from one window to another -
i have child browser window (aspx) opened parent application. child window has controls, , textbox. when user finished, s/he clicks button , following code takes value child window , populates parent, so:
window.opener.document.form1.inputcontainer$letterinput$txtreasons.value = txtval;
this works great textbox have on parent page. now, need populate listbox , not having luck. i've tried these 2 methods no avail:
o.text = txtval; o.value = "1"; window.opener.document.form1.inputcontainer$letterinput$lstreasons.add(o); window.opener.document.form1.inputcontainer$letterinput$lstreasons.add("text", "value");
i "htmlfile: no such interface supported" both.
anybody have ideas?
thanks,
jason
var newoption = document.createelement('option'); newoption.value = textbox.value; // value option have newoption.innerhtml = textbox.value; // displayed text inside of <option> tags // finally, add new option listbox window.opener.document.form1.inputcontainer$letterinput$lstreasons.appendchild(newoption);
Comments
Post a Comment