Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6158649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:59:35+00:00 2026-05-23T20:59:35+00:00

I have a child browser window (aspx) opened from the parent application. The child

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:59:35+00:00Added an answer on May 23, 2026 at 8:59 pm

    Okay, took a little reworking but found a solution!

    First off, create a function in the parent aspx like this:

    function NewOption(newVal)
    {
    //alert("The entry is: " + newVal);
    var sel = document.getElementById("<%= MyListbox.clientID %>");
    sel.options[sel.options.length]=new Option(newVal, newVal, true, true);    
    }
    

    Then, call that function from the child page like this:

    function SendValues()
    {
    var txtVal = document.form1.txtReasons.value;
    var sel = window.opener.NewOption(txtVal);
    }
    

    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!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net page which launches a child page in another browser window
If I have child class,the child class inherits all methods from the parent,but how
I have a child page LoginContent.aspx which contains a login form. If the user
I have parent/child relationship set up via Node Reference. A Child record can have
I have several child windows, all with the same parent. I want to cascade/tile
When you have parent-child tables and you wish to use a DetailsView to edit
I use Entity Framework 4 and I have parent - child relation with Cascade
Greetings. I have a need to have a 'child' modal opended from a colorbox
Say I have a Silverlight Child Windows that uses as a web browser to
I have an ImageButton and a FileUpload controls in a child page of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.