I have a child browser window (aspx) opened from the parent application. The child window has some controls, and a textbox. When the user is finished, s/he clicks a button and the following code takes the value from the child window and populates the parent, like so:
window.opener.document.form1.InputContainer$LetterInput$txtReasons.value = txtVal;
This works great for the textbox I have on the parent page. But now, I need to populate a listbox and am not having much luck. I’ve tried these two methods but to 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 get “htmlfile: No such interface supported” with both.
Anybody have any ideas?
Thanks,
Jason
Okay, took a little reworking but found a solution!
First off, create a function in the parent aspx like this:
Then, call that function from the child page like this:
There’s still a kink or two (it only passes the text, not the value) but it that can be easily fixed by adding an extra parameter…
Hopefully someone else out there can use it!